![]() |
VR-Link API Documentation for DIS
|
Abstract Threading Class Provides a system independent thread object. More...
Collaboration diagram for DtThread:Public Member Functions | |
| DtThread (DtThreadStartSP threadStart) | |
| Constructor. | |
| virtual | ~DtThread () |
| Destructor. | |
| virtual DtThreadStatus | start () |
| Over-ride run to implement thread execution. | |
| DtThreadStatus | startInCurrentThread () |
| Execute within the current thread ( does not start a new thread ) | |
| void | stop (bool blocking) |
| Signals Thread to stop. | |
| bool | hasStarted () const |
| Has the thread been started. | |
| bool | isRunning () const |
| Is thread still active? This is true once the thread has actually started executing. | |
| DtThreadStatus | join () const |
| Wait for thread to finish (blocking). | |
| DtThreadHandle | threadId () const |
| Get the thread's ID. | |
| void | run () |
Static Public Member Functions | |
| static DtThreadId | GetCurrentThreadHandle () |
| Return a unique id for the current thread (useful for thread-specific mapping) | |
Protected Member Functions | |
| bool | stopped () |
| Has stop() been called? | |
Protected Attributes | |
| DtThreadHandle | myThreadID |
| System Independent Thread Handle. | |
Private Member Functions | |
| DtThread (const DtThread &orig) | |
| Copy Ctor and Assign Op. undefined for threads. | |
| DtThread & | operator= (const DtThread &orig) |
Private Attributes | |
| volatile bool | myTimeToStop |
| Stop Flag. | |
| bool | myRunning |
| Active status Flag. | |
| DtThreadStartSP | myThreadStart |
| DtMutex | myMutex |
| Shared lock for protecting critical sections. | |
Abstract Threading Class Provides a system independent thread object.
| DtThread::DtThread | ( | DtThreadStartSP | threadStart | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Copy Ctor and Assign Op. undefined for threads.
|
static |
Return a unique id for the current thread (useful for thread-specific mapping)
| bool DtThread::hasStarted | ( | ) | const |
Has the thread been started.
This true for all times after start() has been called including when the thread has stopped on it's own. The running flag will be set to false after a thread has stopped.
| bool DtThread::isRunning | ( | ) | const |
Is thread still active? This is true once the thread has actually started executing.
Immediately after start this will still return false. When
| DtThreadStatus DtThread::join | ( | ) | const |
Wait for thread to finish (blocking).
| void DtThread::run | ( | ) |
|
virtual |
Over-ride run to implement thread execution.
| DtThreadStatus DtThread::startInCurrentThread | ( | ) |
Execute within the current thread ( does not start a new thread )
| void DtThread::stop | ( | bool | blocking | ) |
Signals Thread to stop.
|
protected |
Has stop() been called?
|
inline |
Get the thread's ID.
|
mutableprivate |
Shared lock for protecting critical sections.
|
private |
Active status Flag.
|
protected |
System Independent Thread Handle.
|
private |
|
private |
Stop Flag.