#include <nthread.h>
Inheritance diagram for regina::NThread:
Public Member Functions | |
virtual | ~NThread () |
Destroys this thread. | |
bool | start (void *args=0, bool deleteAfterwards=false) |
Starts a new thread that performs the run() routine. | |
virtual void * | run (void *args)=0 |
The routine to run in the new thread when start(void*) is called. | |
Static Public Member Functions | |
static bool | start (void *(*routine)(void *), void *args, NThreadID *id) |
Starts a new thread that performs the given routine. | |
static void | yield () |
Causes the currently running thread to voluntarily relinquish the processor. |
Each subclass of NThread represents a specific task that new threads should perform.
A subclass should override run() so that it performs whatever task is required of each new thread. Then start() may be called whenever a new thread is required.
|
Destroys this thread.
|
|
The routine to run in the new thread when start(void*) is called.
Implemented in regina::NFacePairing. |
|
Starts a new thread that performs the given routine. The return value of the given routine is currently ignored.
|
|
Starts a new thread that performs the run() routine. The return value of run() is currently ignored.
|
|
Causes the currently running thread to voluntarily relinquish the processor. Another thread of equal or higher priority will be given a turn instead. |