ARC SDK
|
A set of conditions, mutexes, etc. conveniently exposed to monitor running child threads and to wait till they exit. More...
#include <arc/Thread.h>
Public Member Functions | |
void | RegisterThread (void) |
Register thread as started/starting into this instance. More... | |
void | UnregisterThread (void) |
Report thread as exited. More... | |
bool | WaitOrCancel (int timeout) |
Wait for timeout milliseconds or cancel request. More... | |
bool | WaitForExit (int timeout=-1) |
Wait for registered threads to exit. More... | |
void | RequestCancel (void) |
Send cancel request to registered threads. More... | |
void | forceReset (void) |
This method is meant to be used only after fork. More... | |
A set of conditions, mutexes, etc. conveniently exposed to monitor running child threads and to wait till they exit.
There are no protections against race conditions, so use it carefully.
|
inline |
This method is meant to be used only after fork.
It resets state of all internal locks and variables.
void Arc::ThreadRegistry::RegisterThread | ( | void | ) |
Register thread as started/starting into this instance.
void Arc::ThreadRegistry::RequestCancel | ( | void | ) |
Send cancel request to registered threads.
void Arc::ThreadRegistry::UnregisterThread | ( | void | ) |
Report thread as exited.
bool Arc::ThreadRegistry::WaitForExit | ( | int | timeout = -1 | ) |
Wait for registered threads to exit.
Leave after timeout milliseconds if failed.
bool Arc::ThreadRegistry::WaitOrCancel | ( | int | timeout | ) |
Wait for timeout milliseconds or cancel request.