#include <Thread.h>
A simple Thread commore implementation
bool commore::Thread::is_running |
( |
| ) |
|
- Returns
- true if thread is running
bool commore::Thread::is_stopped |
( |
| ) |
|
- Returns
- true if thread is stopped
bool commore::Thread::is_to_stop |
( |
| ) |
|
- Returns
- true if stop flag is true
bool commore::Thread::request_stop |
( |
| ) |
|
Set the stop flag to true.
virtual void commore::Thread::run |
( |
| ) |
|
|
virtual |
The main thread function. The method is call on start method by created system thread. The thread terminate when this method end. Must be implemented by derived class.
virtual void commore::Thread::run_item |
( |
| ) |
|
|
virtual |
Launched by the default run() implementation each time the the thread is triggered. So this function is designed for short action. In anny case all loop MUST have is_to_stop() as stop condition.
bool commore::Thread::start |
( |
| ) |
|
bool commore::Thread::stop |
( |
| ) |
|
Set the stop flag and wait effective stop
bool commore::Thread::trigger |
( |
| ) |
|
Force thread to end wait or start a run_item
To be used ONLY in run or run_item function wait for time period OR stop flag is set OR trigger call
The documentation for this class was generated from the following file: