ThreadWeaver
ThreadWeaver::Thread Class Reference
The class Thread is used to represent the worker threads in the weaver's inventory. More...
#include <Thread.h>

Signals | |
void | jobDone (ThreadWeaver::Job *) |
void | jobStarted (ThreadWeaver::Thread *, ThreadWeaver::Job *) |
void | started (ThreadWeaver::Thread *) |
Public Member Functions | |
unsigned int | id () |
void | msleep (unsigned long msec) |
void | requestAbort () |
void | run () |
Thread (WeaverImpl *parent=0) | |
~Thread () |
Detailed Description
The class Thread is used to represent the worker threads in the weaver's inventory.
It is not meant to be overloaded.
Definition at line 47 of file Thread.h.
Constructor & Destructor Documentation
Thread::Thread | ( | WeaverImpl * | parent = 0 |
) | [explicit] |
Create a thread.
These thread objects are only used inside the Weaver parent object.
- Parameters:
-
parent the parent WeaverImpl
Definition at line 110 of file Thread.cpp.
Thread::~Thread | ( | ) |
The destructor.
Definition at line 117 of file Thread.cpp.
Member Function Documentation
unsigned int Thread::id | ( | ) |
Returns the thread id.
This id marks the respective Thread object, and must therefore not be confused with, e.g., the pthread thread ID.
Generally, the way threads are implemented is not specified. id() is the only way to uniquely identify a thread within ThreadWeaver.
Definition at line 122 of file Thread.cpp.
void ThreadWeaver::Thread::jobDone | ( | ThreadWeaver::Job * | ) | [signal] |
The thread finished to execute a job.
void ThreadWeaver::Thread::jobStarted | ( | ThreadWeaver::Thread * | , | |
ThreadWeaver::Job * | ||||
) | [signal] |
The thread started to process a job.
void Thread::msleep | ( | unsigned long | msec | ) |
Provide the msleep() method (protected in QThread) to be available for executed jobs.
- Parameters:
-
msec amount of milliseconds
Definition at line 148 of file Thread.cpp.
void Thread::requestAbort | ( | ) |
Request the abortion of the current job.
If there is no current job, this method will do nothing, but can safely be called. It forwards the request to the current Job.
Definition at line 154 of file Thread.cpp.
void Thread::run | ( | ) |
void ThreadWeaver::Thread::started | ( | ThreadWeaver::Thread * | ) | [signal] |
The thread has been started.
The documentation for this class was generated from the following files: