![]() |
Open Lighting Architecture 0.10.9
|
A thread which executes a Callback.
Public Types | |
| typedef Callback0< bool > | PeriodicCallback |
| The callback to run. | |
Public Member Functions | |
| PeriodicThread (const TimeInterval &delay, PeriodicCallback *callback, const Options &options=Options()) | |
| void | Stop () |
| Stop the PeriodicThread. | |
Protected Member Functions | |
| void * | Run () |
| The entry point for the new thread. | |
| 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.