KDE PIM / Developers / API Docs / libkdepim

KPIM::ThreadWeaver::Thread Class Reference

The class Thread is used to represent the worker threads in the weaver's inventory. More...

#include <weaver.h>

Inherits QThread.

List of all members.

Public Member Functions


Detailed Description

The class Thread is used to represent the worker threads in the weaver's inventory.

It is not meant to be overloaded.


Constructor & Destructor Documentation

KPIM::ThreadWeaver::Thread::Thread Weaver parent  ) 
 

Create a thread.

These thread objects are only used inside the Weaver parent object.

KPIM::ThreadWeaver::Thread::~Thread  ) 
 

The destructor.


Member Function Documentation

void KPIM::ThreadWeaver::Thread::run  ) 
 

Overloaded to execute the assigned job.

This will NOT return until shutdown() is called. The thread will try to execute one job after the other, asking the Weaver parent for a new job when the assigned one is finished. If no jobs are available, the thread will suspend. After shutdown() is called, the thread will end as soon as the currently assigned job is done.

const unsigned int KPIM::ThreadWeaver::Thread::id  )  const
 

Returns the thread id.

This id marks the respective Thread object, and must therefore not be confused with, e.g., the pthread thread ID.

void KPIM::ThreadWeaver::Thread::post Event::Action  ,
Job = 0
 

Post an event, will be received and processed by the Weaver.


The documentation for this class was generated from the following files: