Library of Assembled Shared Sources
|
A base class for threads. More...
#include <thread.h>
Public Member Functions | |
virtual | ~Thread () |
void | bind (size_t processor) |
bind this thread to a processor (this as in this-pointer) | |
Static Public Member Functions | |
static void | bindCurrent (size_t processor) |
bind current thread to a processor (current as in callee's context) | |
Static Public Attributes | |
static constexpr size_t | anyProcessor = size_t(-1) |
argument for Thread::bind to unbind the thread so it runs on any processor | |
A base class for threads.
The virtual function doRun() needs to be overriden and after creation of the thread on the heap or stack, the thread is in a state ready to be run.
The run() function actually starts the thread.
JOINABLE threads can be waited for, DETACHED threads can not be waited for.
|
virtual |
Definition at line 243 of file thread.cpp.