RAUL
0.8.0
|
Thread driven by (realtime safe) signals. More...
#include <Slave.hpp>
Public Member Functions | |
void | whip () |
Tell the slave to do whatever work it does. More... | |
![]() | |
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) |
Protected Member Functions | |
virtual void | _whipped ()=0 |
Worker method. More... | |
![]() | |
Thread (const std::string &name="") | |
Thread (pthread_t thread, const std::string &name="") | |
Must be called from thread. | |
Protected Attributes | |
Semaphore | _whip |
![]() | |
bool | _exit_flag |
Additional Inherited Members | |
![]() | |
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... | |
Thread driven by (realtime safe) signals.
Use this to perform some task in a separate thread you want to 'drive' from a realtime (or otherwise) thread.
|
inline |
|
protectedpure virtual |
Worker method.
This is called once from this thread every time whip() is called. Implementations likely want to put a single (non loop) chunk of code here, e.g. to process an event.