InspIRCd  3.0
Public Member Functions | Protected Member Functions | Friends | List of all members
Thread Class Referenceabstract

#include <threadengine.h>

Inheritance diagram for Thread:
ConfigReaderThread QueuedThread SocketThread

Public Member Functions

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

Protected Member Functions

bool GetExitFlag ()


class ThreadEngine

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::Thread ( )

Set Creator to NULL at this point

Member Function Documentation

◆ GetExitFlag()

bool Thread::GetExitFlag ( )

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

◆ join()

void Thread::join ( )

Join the thread (calls SetExitFlag and waits for exit)

◆ Run()

virtual void Thread::Run ( )
pure virtual

Override this method to put your actual threaded code here.

Implemented in ConfigReaderThread.

◆ SetExitFlag()

void Thread::SetExitFlag ( )

Signal the thread to exit gracefully.

Reimplemented in SocketThread, and QueuedThread.

Friends And Related Function Documentation

◆ ThreadEngine

friend class ThreadEngine

ThreadEngine manages Thread::state

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