InspIRCd  4.0
Public Member Functions | Protected Member Functions | List of all members
Thread Class Referenceabstract
Inheritance diagram for Thread:
ConfigReaderThread SocketThread

Public Member Functions

virtual ~Thread ()=default
 
bool IsRunning () const
 
bool IsStopping () const
 
bool Start ()
 
bool Stop ()
 

Protected Member Functions

virtual void OnStart ()=0
 
virtual void OnStop ()
 
 Thread ()=default
 

Constructor & Destructor Documentation

◆ Thread()

Thread::Thread ( )
protecteddefault

Initialises an instance of the Thread class.

◆ ~Thread()

virtual Thread::~Thread ( )
virtualdefault

Destroys an instance of the Thread class.

Member Function Documentation

◆ IsRunning()

bool Thread::IsRunning ( ) const
inline

Determines whether this thread is currently running.

◆ IsStopping()

bool Thread::IsStopping ( ) const
inline

Determines whether this thread is currently stopping.

◆ OnStart()

virtual void Thread::OnStart ( )
protectedpure virtual

Callback which is executed on this thread after it has started.

Implemented in ConfigReaderThread.

◆ OnStop()

virtual void Thread::OnStop ( )
inlineprotectedvirtual

Callback which is executed on the calling thread before this thread is stopped.

Reimplemented in SocketThread, and ConfigReaderThread.

◆ Start()

bool Thread::Start ( )

Starts the execution of this thread.

Returns
True if the thread was started, false if it was already running.

◆ Stop()

bool Thread::Stop ( )

Stops the execution of this thread.

Returns
True if the thread was stopped, false if it was already stopped.

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