|
ZNC trunk
|
#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. | |
| void | cancelJob (CJob *job) |
| Cancel a job that was previously passed to addJob(). | |
| void | cancelJobs (const std::set< CJob * > &jobs) |
| Cancel some jobs that were previously passed to addJob(). | |
| int | getReadFD () const |
| void | handlePipeReadable () const |
Static Public Member Functions | |
| static CThreadPool & | Get () |
Friends | |
| class | CJob |
| void CThreadPool::addJob | ( | CJob * | job | ) |
Add a job to the thread pool and run it. The job will be deleted when done.
References CJob.
| void CThreadPool::cancelJob | ( | CJob * | job | ) |
| 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 |
|
inline |
| void CThreadPool::handlePipeReadable | ( | ) | const |
References CJob.
|
friend |
References CJob.
Referenced by addJob(), cancelJob(), CJob, and handlePipeReadable().