ZNC  trunk
Public Member Functions | Static Public Member Functions | Friends | List of all members
CThreadPool Class Reference

#include <Threads.h>

Public Member Functions

void addJob (CJob *job)
 Add a job to the thread pool and run it. The job will be deleted when done. More...
 
void cancelJob (CJob *job)
 Cancel a job that was previously passed to addJob(). More...
 
void cancelJobs (const std::set< CJob * > &jobs)
 Cancel some jobs that were previously passed to addJob(). More...
 
int getReadFD () const
 
void handlePipeReadable () const
 

Static Public Member Functions

static CThreadPoolGet ()
 

Friends

class CJob
 

Member Function Documentation

◆ addJob()

void CThreadPool::addJob ( CJob job)

Add a job to the thread pool and run it. The job will be deleted when done.

◆ cancelJob()

void CThreadPool::cancelJob ( CJob job)

Cancel a job that was previously passed to addJob().

This might mean that runThread() and/or runMain() will not be called on the job. This function BLOCKS until the job finishes!

◆ cancelJobs()

void CThreadPool::cancelJobs ( const std::set< CJob * > &  jobs)

Cancel some jobs that were previously passed to addJob().

This might mean that runThread() and/or runMain() will not be called on some of the jobs. This function BLOCKS until all jobs finish!

◆ Get()

static CThreadPool& CThreadPool::Get ( )
static

◆ getReadFD()

int CThreadPool::getReadFD ( ) const
inline

◆ handlePipeReadable()

void CThreadPool::handlePipeReadable ( ) const

Friends And Related Function Documentation

◆ CJob

friend class CJob
friend

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