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

Public Member Functions

void NotifyParent ()
 
void LockQueue ()
 
void UnlockQueue ()
 
void UnlockQueueWakeup ()
 
void OnStop () override
 
virtual void OnNotify ()=0
 
- Public Member Functions inherited from Thread
virtual ~Thread ()=default
 
bool IsRunning () const
 
bool IsStopping () const
 
bool Start ()
 
bool Stop ()
 

Protected Member Functions

void WaitForQueue ()
 
- Protected Member Functions inherited from Thread
virtual void OnStart ()=0
 
 Thread ()=default
 

Member Function Documentation

◆ LockQueue()

void SocketThread::LockQueue ( )
inline

Lock queue.

◆ NotifyParent()

void SocketThread::NotifyParent ( )

Notifies parent by making the SignalFD ready to read No requirements on locking

◆ OnNotify()

virtual void SocketThread::OnNotify ( )
pure virtual

Called in the context of the parent thread after a notification has passed through the socket

◆ OnStop()

void SocketThread::OnStop ( )
inlineoverridevirtual

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

Reimplemented from Thread.

◆ UnlockQueue()

void SocketThread::UnlockQueue ( )
inline

Unlock queue.

◆ UnlockQueueWakeup()

void SocketThread::UnlockQueueWakeup ( )
inline

Unlock queue and send wakeup to worker

◆ WaitForQueue()

void SocketThread::WaitForQueue ( )
inlineprotected

Waits for an enqueue operation to complete You MUST hold the queue lock when you call this. It will be unlocked while you wait, and will be relocked before the function returns


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