Thread driven by (realtime safe) signals.
More...
#include <Slave.hpp>
Public Member Functions |
void | whip () |
| Tell the slave to do whatever work it does.
|
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.
|
| 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.
|
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.
|
Detailed Description
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.
Member Function Documentation
void Raul::Slave::whip |
( |
| ) |
|
|
inline |
virtual void Raul::Slave::_whipped |
( |
| ) |
|
|
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.
The documentation for this class was generated from the following file: