InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Thread Class Referenceabstract

#include <threadengine.h>

Inheritance diagram for Thread:
ConfigReaderThread QueuedThread SocketThread TestSuiteThread

Public Member Functions

 Thread ()
virtual ~Thread ()
virtual void Run ()=0
virtual void SetExitFlag ()
void join ()

Public Attributes


Protected Member Functions

bool GetExitFlag ()

Detailed Description

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!

Constructor & Destructor Documentation

Thread::Thread ( )

Set Creator to NULL at this point

Thread::~Thread ( )

If this thread has a Creator set, call it to free the thread

Member Function Documentation

bool Thread::GetExitFlag ( )

Get thread's current exit status. (are we being asked to exit?)

void Thread::join ( )

Join the thread (calls SetExitFlag and waits for exit)

virtual void Thread::Run ( )
pure virtual

Override this method to put your actual threaded code here.

Implemented in ConfigReaderThread, and TestSuiteThread.

void Thread::SetExitFlag ( )

Signal the thread to exit gracefully.

Reimplemented in SocketThread, and QueuedThread.

Member Data Documentation

ThreadData* Thread::state

Opaque thread state managed by threading engine

The documentation for this class was generated from the following files: