A single threaded agent.
This is a simple wrapper around the std::thread primitive.
Note: ProcessingLoop method is pure virtual in ThreadedWorker. It may be called only after Vtable of child object is constructed. For that reason it is responsibility for child class to call Start method from its constructor. It is also beneficial to mark child classes as final.
void osmscout::ThreadedWorker::MarkWorkerAsFailed |
( |
| ) |
|
|
inlineprotected |
Worker can set itself to the failure status.
This can later on queried by the parent process after Wait() to stop further processing.
The status is not protected by a mutex, please only call from inside the worker.
We currently do not support propagation of an detailed error object. We assume that the worker itself logs its error and that the parent worker is only interested in a boolean status.
This might change in future.