RAUL
0.8.0
|
Abstract base class for a thread. More...
#include <Thread.hpp>
Public Member Functions | |
virtual void | start () |
Launch and start the thread. | |
virtual void | stop () |
Stop and terminate the thread. | |
virtual void | join () |
void | set_scheduling (int policy, unsigned int priority) |
const std::string & | name () const |
void | set_name (const std::string &name) |
bool | is_context (unsigned context) const |
void | set_context (unsigned context) |
Static Public Member Functions | |
static Thread * | create (const std::string &name="") |
static Thread * | create_for_this_thread (const std::string &name="") |
Must be called from thread. | |
static Thread & | get () |
Return the calling thread. More... | |
Protected Member Functions | |
Thread (const std::string &name="") | |
Thread (pthread_t thread, const std::string &name="") | |
Must be called from thread. | |
virtual void | _run () |
Thread function to execute. More... | |
Protected Attributes | |
bool | _exit_flag |
Abstract base class for a thread.
Extend this and override the _run method to easily create a thread to perform some task.
|
static |
Return the calling thread.
The return value of this should NOT be cached unless the thread is explicitly user created with create().
|
inlineprotectedvirtual |