Open Lighting Architecture
Latest Git
|
A thread which executes a Callback.
Public Types | |
typedef Callback0< bool > | PeriodicCallback |
The callback to run. More... | |
Public Member Functions | |
PeriodicThread (const TimeInterval &delay, PeriodicCallback *callback, const Options &options=Options()) | |
void | Stop () |
Stop the PeriodicThread. More... | |
Protected Member Functions | |
void * | Run () |
The entry point for the new thread. More... | |
typedef Callback0<bool> ola::thread::PeriodicThread::PeriodicCallback |
The callback to run.
If false is returned, the thread will stop.
|
explicit |
Create a new PeriodicThread.
delay | The delay between invoking the callback. |
callback | the callback to run in the new thread. |
options | the thread's options. |
The thread will start running and immediately run the callback. This may happen before the constructor returns.
|
protectedvirtual |
The entry point for the new thread.
Sub classes must implement this.
Implements ola::thread::Thread.
void ola::thread::PeriodicThread::Stop | ( | ) |
Stop the PeriodicThread.
This blocks until the thread is no longer running.