Simple threads. More...
#include <thread.hpp>
Classes | |
class | Run |
A real thread. More... | |
Static Public Member Functions | |
static Mutex * | m (void) |
Mutex for synchronization. | |
static void | run (Runnable *r) |
Construct a new thread and run r. | |
static void | sleep (unsigned int ms) |
Put current thread to sleep for ms milliseconds. | |
static unsigned int | npu (void) |
Return number of processing units (1 if information not available) | |
Static Public Attributes | |
static Run * | idle = NULL |
Idle runners. | |
Simple threads.
Threads cannot be created, only runnable objects can be submitted for execution by a thread. Threads are pooled to avoid creation/destruction of threads as much as possible.
Definition at line 296 of file thread.hpp.
|
static |
Mutex for synchronization.
Definition at line 42 of file thread.cpp.
|
inlinestatic |
Construct a new thread and run r.
After r terminates, r is deleted. After that, the thread terminates.
If the operating system does not support any threads, throws an exception of type Support::OperatingSystemError.
Definition at line 115 of file thread.hpp.
|
inlinestatic |
|
inlinestatic |
|
static |
Idle runners.
Definition at line 323 of file thread.hpp.