A Threaded object runs a DtRunnable object in a separate thread.
More...
List of all members.
Public Member Functions |
| | DtThreadedObject (DtRunnableSP ptr) |
| | Constructor, pass it owner ship of a DtThreadable object.
|
|
| ~DtThreadedObject () |
| | Warning, destructor calls blocking function: stop(true)
|
| void | start () |
| | Starts the thread running, calls its DtThreadable run method A thread can be started again if it is finished running.
|
| void | join () |
| | Block the current thread until the threaded object stops running.
|
|
void | stop (bool block) |
| | Signal the object to stop, it may not respond Optionally block execution until it stops Calls the DtThreadable run method.
|
|
bool | running () const |
| | Is the thread running.
|
|
bool | started () const |
| | Has the threaded objected started.
|
| void | setRunnableObject (DtRunnableSP newObject) |
| | Set the threadable object to be run.
|
|
DtRunnableSP | runnableObject () const |
| | Gets the threadable object.
|
Protected Member Functions |
|
void | setRunning (bool value) |
| | Change the running state.
|
Protected Attributes |
|
bool | myRunningFlag |
|
DtRunnableSP | myObject |
|
DtBoost::shared_ptr< DtThread > | myThread |
|
DtMutex | myMutex |
Detailed Description
A Threaded object runs a DtRunnable object in a separate thread.
Constructor & Destructor Documentation
| MAKLogger::DtThreadedObject::DtThreadedObject |
( |
DtRunnableSP |
ptr | ) |
|
Constructor, pass it owner ship of a DtThreadable object.
- Exceptions:
-
Member Function Documentation
| void MAKLogger::DtThreadedObject::join |
( |
| ) |
|
Block the current thread until the threaded object stops running.
- Exceptions:
-
| void MAKLogger::DtThreadedObject::setRunnableObject |
( |
DtRunnableSP |
newObject | ) |
|
Set the threadable object to be run.
- Exceptions:
-
| void MAKLogger::DtThreadedObject::start |
( |
| ) |
|
Starts the thread running, calls its DtThreadable run method A thread can be started again if it is finished running.
The documentation for this class was generated from the following file: