Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
ola::thread::CallbackThread Class Reference

Detailed Description

A thread which executes a Callback.

Inheritance diagram for ola::thread::CallbackThread:
Inheritance graph
[legend]
Collaboration diagram for ola::thread::CallbackThread:
Collaboration graph
[legend]

Public Types

typedef SingleUseCallback0< void > VoidThreadCallback
 

Public Member Functions

 CallbackThread (VoidThreadCallback *callback, const Options &options=Options())
 
- Public Member Functions inherited from ola::thread::Thread
 Thread (const Options &options=Options())
 Create a new thread with the specified thread options. More...
 
virtual ~Thread ()
 Destructor.
 
virtual bool Start ()
 Start the thread and wait for the thread to be running. More...
 
virtual bool FastStart ()
 Start the thread and return immediately. More...
 
virtual bool Join (void *ptr=NULL)
 Join this thread. More...
 
bool IsRunning ()
 Check if the thread is running. More...
 
ThreadId Id () const
 Return the thread id. More...
 
std::string Name () const
 Return the thread name. More...
 

Protected Member Functions

void * Run ()
 The entry point for the new thread. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ola::thread::Thread
static ThreadId Self ()
 Returns the current thread's id. More...
 

Constructor & Destructor Documentation

ola::thread::CallbackThread::CallbackThread ( VoidThreadCallback callback,
const Options options = Options() 
)
inlineexplicit

Create a new CallbackThread.

Parameters
callbackthe callback to run in the new thread.
optionsthe thread's options.

Member Function Documentation

void* ola::thread::CallbackThread::Run ( )
inlineprotectedvirtual

The entry point for the new thread.

Returns
A value returned to Join().

Sub classes must implement this.

Implements ola::thread::Thread.


The documentation for this class was generated from the following file: