#include <Thread.h>
List of all members.
Detailed Description
This class wrapps a kernel thread object. It provides a simple and convinient interface to the API functions using object oriented design. Lots of tricky code is wrapped to avoid deadlocks and other nasty behaviours just using API functions.
Member Enumeration Documentation
Type of thread priority
- Enumerator:
| etNormal |
|
| etLow |
|
| etHigh |
|
| etLower |
|
| etHigher |
|
| etTimeCritical |
|
Constructor & Destructor Documentation
| TThread::TThread |
( |
EPriority |
ePriority = etNormal ) |
|
Creates a thread
- Parameters:
-
| ePriority | : Thread priority |
Creates a thread using an external object as executing
- Parameters:
-
| rObj | : Object for execution |
| ePriority | : Thread priority |
| TThread::~TThread |
( |
) |
[protected, virtual] |
Member Function Documentation
| virtual void MQUALIFIER zeus::TThread::addRef |
( |
) |
const [virtual] |
| virtual Retval MQUALIFIER zeus::TThread::askForInterface |
( |
const InterfaceID & |
rInterfaceID, |
|
|
IZUnknown *& |
rpIface |
|
) |
| [virtual] |
| void TThread::execute |
( |
) |
[protected, virtual] |
returns the priority of the thread
| Uint MQUALIFIER TThread::getThreadID |
( |
) |
const [virtual] |
| bool zeus::TThread::isAlive |
( |
) |
const [inline, virtual] |
| bool zeus::TThread::isDead |
( |
) |
const [inline, virtual] |
Checks if the thread is dead. The thread is dead if never start() has been called or after its termination using signalizeStop() or kill().
- Return values:
-
| true | : Thread is not running |
| false | : Thread still runs |
| bool MQUALIFIER zeus::TThread::isInterrupted |
( |
) |
const [inline, virtual] |
| void TThread::kill |
( |
Float64 |
dTimeOut = 0 ) |
[virtual] |
| virtual void zeus::TThread::onStarted |
( |
) |
[inline, protected, virtual] |
| virtual void zeus::TThread::onTerminated |
( |
) |
[inline, protected, virtual] |
| Retval TThread::postObject |
( |
ISynchronizeObject & |
rObject, |
|
|
bool |
bWaitForCompletion |
|
) |
| [virtual] |
this sends a message to the queue of the thread
- Note:
- This method could cause dead locks, if the thread is not started, but the bWaitForCompletion flag is set. Start the thread first
- See also:
- IThreadManager::postObject
| virtual void MQUALIFIER zeus::TThread::release |
( |
) |
const [virtual] |
| void TThread::resume |
( |
) |
[virtual] |
This starts a stopped thread.
| void TThread::setPriority |
( |
EPriority |
ePriority ) |
|
sets a new priority of the thread
- Parameters:
-
| bool TThread::signalizeStop |
( |
Float64 |
dTimeOut = 5.0 ) |
[virtual] |
| void TThread::sleep |
( |
const Float & |
rfDelay ) |
[static] |
Suspends the thread for a given time in seconds
| bool TThread::start |
( |
) |
[virtual] |
Starts the thread.
- Return values:
-
| true,: | Thread created and successfully started |
| false,: | Could not start the thread (OS error) |
| void TThread::suspend |
( |
) |
[virtual] |
This stopps a thread. Using resume() the thread can be restarted
| bool TThread::yield |
( |
) |
[virtual] |
this method causes the OS to switch to an other thread (scheduling).
- Return values:
-
| true | : yield has been performed |
| false,: | could not yield thread |
Member Data Documentation
Flag to check if the thread should terminate.
Message queue of the thread.
The documentation for this class was generated from the following files: