InspIRCd
2.0
|
#include <threadengine.h>
Public Member Functions | |
Thread () | |
virtual | ~Thread () |
virtual void | Run ()=0 |
virtual void | SetExitFlag () |
void | join () |
Public Attributes | |
ThreadData * | state |
Protected Member Functions | |
bool | GetExitFlag () |
Derive from this class to implement your own threaded sections of code. Be sure to keep your code thread-safe and not prone to deadlocks and race conditions if you MUST use threading!
|
inline |
Set Creator to NULL at this point
|
virtual |
If this thread has a Creator set, call it to free the thread
|
inlineprotected |
Get thread's current exit status. (are we being asked to exit?)
void Thread::join | ( | ) |
Join the thread (calls SetExitFlag and waits for exit)
|
pure virtual |
Override this method to put your actual threaded code here.
Implemented in TestSuiteThread, and ConfigReaderThread.
|
virtual |
Signal the thread to exit gracefully.
Reimplemented in SocketThread, and QueuedThread.
ThreadData* Thread::state |
Opaque thread state managed by threading engine