Public Member Functions | |
bool | getHasWorked () |
HardWorker () | |
bool | shutdown () override |
void | work () override |
~HardWorker () override=default | |
Public Member Functions inherited from RunnableService | |
std::string | getStatusString () override |
virtual bool | isRunning () |
void | join () |
RunnableService () | |
bool | start () override |
void | waitForShutdown () |
void | waitForShutdown (std::chrono::milliseconds millis) |
~RunnableService () override=default | |
Public Member Functions inherited from Service | |
ServiceState | getState () |
Service () | |
virtual | ~Service ()=default |
Private Attributes | |
bool | has_worked_ |
std::condition_variable | test_cv |
std::mutex | test_mtx |
Additional Inherited Members | |
Protected Member Functions inherited from RunnableService | |
virtual void | run () |
virtual bool | startWorkerThread () |
virtual bool | stopWorkerThread () |
Protected Member Functions inherited from Service | |
void | setState (ServiceState new_state) |
Simple extension of the RunnableService used for testing
Definition at line 27 of file runnable_service_test.cpp.
|
inline |
Definition at line 30 of file runnable_service_test.cpp.
|
overridedefault |
|
inline |
Definition at line 50 of file runnable_service_test.cpp.
|
inlineoverridevirtual |
Stops the worker thread. Should be overridden if other actions are necessary to stop.
Reimplemented from RunnableService.
Definition at line 36 of file runnable_service_test.cpp.
|
inlineoverridevirtual |
Implement this method to do work. Note: this method is assumed to NOT block, otherwise shutdown does nothing.
Implements RunnableService.
Definition at line 42 of file runnable_service_test.cpp.
|
private |
Definition at line 54 of file runnable_service_test.cpp.
|
private |
Definition at line 55 of file runnable_service_test.cpp.
|
mutableprivate |
Definition at line 56 of file runnable_service_test.cpp.