Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/Thread.h>
Public Member Functions | |
Runnable (void) | |
virtual | ~Runnable (void) |
virtual void | run (void) |
Thread * | thread (void) const |
Static Public Member Functions | |
static Runnable & | current (void) |
Static Public Attributes | |
static Runnable | null |
Protected Member Functions | |
void | stop (void) |
A runnable must of the parent of any class representing a computation performed in a thread.
The user must overload the run() method in order to provided the computation of the thread and may use the stop() method to stop the thread.
Whatever, the end of run method stop also the thread.
Get the runnable for the current thread.
References Thread::current(), and Thread::runnable().
This method must be overloaded to provide the computation to the thread. As a default, it does nothing and return immediately.
Cause the thread to stop immediately.
References Thread::stop().