Public Member Functions | |
| Thread (const std::string &name) | |
| virtual | ~Thread () |
| void | start () |
| void | stopAsync () |
| bool | stopRequested () const |
| void | join () const |
| ThreadId | id () const |
Custom thread classes should derive from this class and implement the 'run' method.
|
explicit |
Creates the Thread object without running a real thread.
|
virtual |
Cleans up internal resources.
| ThreadId id | ( | ) | const |
Returns the platform identifier.
| void join | ( | ) | const |
Joins the thread completion.
| void start | ( | ) |
Creates and runs an actual thread.
Can be called only once for the current 'Thread' instance.
| The | std::exception if the thread is started or joined already. |
| void stopAsync | ( | ) |
Sends a stop signal to the thread.
| bool stopRequested | ( | ) | const |
Returns 'true' if a stop signal is sent to the thread by the stopAsync method or in a different way, otherwise 'false'.