Raul::Slave Class Referenceabstract
Realtime Audio Utility Library

Thread driven by (realtime safe) signals. More...

`#include <Slave.hpp>`

Inheritance diagram for Raul::Slave:
Collaboration diagram for Raul::Slave:

## Public Member Functions

void | whip ()
| Tell the slave to do whatever work it does. More...
Public Member Functions inherited from Raul::Thread
virtual void | start ()
| Launch and start the thread. More...
virtual void | stop ()
| Stop and terminate the thread. More...
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...
Protected Member Functions inherited from Raul::Thread
| Thread (const std::string &name="")
| Thread (pthread_t thread, const std::string &name="")
| Must be called from thread.

## Protected Attributes

Semaphore | _whip
Protected Attributes inherited from Raul::Thread
bool | _exit_flag

## Additional Inherited Members

Static Public Member Functions inherited from Raul::Thread
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...

## 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

Tell the slave to do whatever work it does.

Realtime safe.

References Raul::Semaphore::post().

virtual void Raul::Slave::_whipped | ( |  | ) |

protected pure 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:

- Slave.hpp