#include <threadpool.h>
Inheritance diagram for PThreadPoolBase:
Public Member Functions | |
~PThreadPoolBase () | |
virtual WorkerThreadBase * | CreateWorkerThread ()=0 |
virtual WorkerThreadBase * | AllocateWorker () |
virtual WorkerThreadBase * | NewWorker () |
unsigned | GetMaxWorkers () const |
void | SetMaxWorkers (unsigned count) |
unsigned | GetMaxUnits () const |
void | SetMaxUnits (unsigned count) |
Protected Types | |
typedef std::vector< WorkerThreadBase * > | WorkerList_t |
Protected Member Functions | |
PThreadPoolBase (unsigned maxWorkerCount=10, unsigned maxWorkUnitCount=0) | |
virtual bool | CheckWorker (WorkerThreadBase *worker) |
void | StopWorker (WorkerThreadBase *worker) |
Protected Attributes | |
PMutex | m_listMutex |
WorkerList_t | m_workers |
unsigned | m_maxWorkerCount |
unsigned | m_maxWorkUnitCount |
Classes | |
class | InternalWorkBase |
class | WorkerThreadBase |
typedef std::vector<WorkerThreadBase *> PThreadPoolBase::WorkerList_t [protected] |
PThreadPoolBase::~PThreadPoolBase | ( | ) |
PThreadPoolBase::PThreadPoolBase | ( | unsigned | maxWorkerCount = 10 , |
|
unsigned | maxWorkUnitCount = 0 | |||
) | [protected] |
virtual WorkerThreadBase* PThreadPoolBase::AllocateWorker | ( | ) | [virtual] |
virtual bool PThreadPoolBase::CheckWorker | ( | WorkerThreadBase * | worker | ) | [protected, virtual] |
virtual WorkerThreadBase* PThreadPoolBase::CreateWorkerThread | ( | ) | [pure virtual] |
Implemented in PQueuedThreadPool< Work_T >.
unsigned PThreadPoolBase::GetMaxUnits | ( | ) | const [inline] |
unsigned PThreadPoolBase::GetMaxWorkers | ( | ) | const [inline] |
virtual WorkerThreadBase* PThreadPoolBase::NewWorker | ( | ) | [virtual] |
void PThreadPoolBase::SetMaxUnits | ( | unsigned | count | ) | [inline] |
void PThreadPoolBase::SetMaxWorkers | ( | unsigned | count | ) | [inline] |
void PThreadPoolBase::StopWorker | ( | WorkerThreadBase * | worker | ) | [protected] |
PMutex PThreadPoolBase::m_listMutex [protected] |
unsigned PThreadPoolBase::m_maxWorkerCount [protected] |
unsigned PThreadPoolBase::m_maxWorkUnitCount [protected] |
WorkerList_t PThreadPoolBase::m_workers [protected] |