A Threaded object runs a DtRunnable object in a separate thread.
More...
A Threaded object runs a DtRunnable object in a separate thread.
| MAKLogger::DtThreadedObject::DtThreadedObject |
( |
DtRunnableSP |
ptr, |
|
|
DtString |
name = 0 |
|
) |
| |
Constructor, pass it owner ship of a DtThreadable object.
- Exceptions
-
| MAKLogger::DtThreadedObject::~DtThreadedObject |
( |
| ) |
|
Warning, destructor calls blocking function: stop(true)
| void MAKLogger::DtThreadedObject::join |
( |
| ) |
|
Block the current thread until the threaded object stops running.
- Exceptions
-
| DtRunnableSP MAKLogger::DtThreadedObject::runnableObject |
( |
| ) |
const |
Gets the threadable object.
| bool MAKLogger::DtThreadedObject::running |
( |
| ) |
const |
| void MAKLogger::DtThreadedObject::setRunnableObject |
( |
DtRunnableSP |
newObject | ) |
|
Set the threadable object to be run.
- Exceptions
-
| void MAKLogger::DtThreadedObject::setRunning |
( |
bool |
value | ) |
|
|
protected |
Change the running state.
| void MAKLogger::DtThreadedObject::start |
( |
| ) |
|
Starts the thread running, calls its DtThreadable run method A thread can be started again if it is finished running.
| bool MAKLogger::DtThreadedObject::started |
( |
| ) |
const |
Has the threaded objected started.
| void MAKLogger::DtThreadedObject::stop |
( |
bool |
block | ) |
|
Signal the object to stop, it may not respond Optionally block execution until it stops Calls the DtThreadable run method.
| DtMutex MAKLogger::DtThreadedObject::myMutex |
|
mutableprotected |
| bool MAKLogger::DtThreadedObject::myRunningFlag |
|
protected |
| std::shared_ptr<DtThread> MAKLogger::DtThreadedObject::myThread |
|
protected |
| DtString MAKLogger::DtThreadedObject::myThreadName |
|
protected |
The documentation for this class was generated from the following file: