#include <Worker.h>
Definition at line 48 of file Worker.h.
dev::Worker::Worker |
( |
std::string const & |
_name = "anon" , |
|
|
unsigned |
_idleWaitMs = 30 |
|
) |
| |
|
inlineprotected |
dev::Worker::Worker |
( |
Worker && |
_m | ) |
|
|
inlineprotected |
Move-constructor.
Definition at line 54 of file Worker.h.
virtual dev::Worker::~Worker |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual void dev::Worker::doneWorking |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual void dev::Worker::doWork |
( |
| ) |
|
|
inlineprotectedvirtual |
bool dev::Worker::isWorking |
( |
| ) |
const |
|
inlineprotected |
Returns if worker thread is present.
Definition at line 76 of file Worker.h.
Move-assignment.
Definition at line 57 of file Worker.h.
void dev::Worker::setName |
( |
std::string |
_n | ) |
|
|
inlineprotected |
Allows changing worker name if work is stopped.
Definition at line 67 of file Worker.h.
bool dev::Worker::shouldStop |
( |
| ) |
const |
|
inlineprotected |
virtual void dev::Worker::startedWorking |
( |
| ) |
|
|
inlineprotectedvirtual |
void Worker::startWorking |
( |
| ) |
|
|
protected |
void Worker::stopWorking |
( |
| ) |
|
|
protected |
void Worker::terminate |
( |
| ) |
|
|
private |
Blocks caller into worker thread has finished.
Stop and never start again.
Definition at line 99 of file Worker.cpp.
void Worker::workLoop |
( |
| ) |
|
|
protectedvirtual |
unsigned dev::Worker::m_idleWaitMs = 0 |
|
private |
std::string dev::Worker::m_name |
|
private |
std::unique_ptr<std::thread> dev::Worker::m_work |
|
private |
The network thread.
Definition at line 103 of file Worker.h.
Mutex dev::Worker::x_work |
|
mutableprivate |
Lock for the network existance.
Definition at line 102 of file Worker.h.
The documentation for this class was generated from the following files: