ZNC  trunk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

void CThreadPool::addJob ( CJob job)

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

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!

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!

static CThreadPool& CThreadPool::Get ( )
static
int CThreadPool::getReadFD ( ) const
inline
void CThreadPool::handlePipeReadable ( ) const

Friends And Related Function Documentation

friend class CJob
friend

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