tbx
0.7.5
|
Helper class to stop pthreads from executing during event processing which is unsafe. More...
#include <pthreadguard.h>
Static Public Member Functions | |
static void | start () |
Start the pthread guard if it is not already started. More... | |
static void | stop () |
Turns off the thread guard. More... | |
Helper class to stop pthreads from executing during event processing which is unsafe.
|
static |
Start the pthread guard if it is not already started.
This should be called before the running thread is created.
Once started it stops threading during event processing as this is likely to cause a crash and calls pthread_yield after event processing to ensure running threads get a call on each event
|
static |
Turns off the thread guard.
Should only be called when there are no thread running