![]() |
CThreadPool() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Public Constructor |
Declared in: ThreadPool.h |
CThreadPool( unsigned long ulNumberOfThreads, unsigned long ulMaxJobsPending=THREAD_POOL_DEFAULT_JOBS, LPInitializePoolProc pInitializeProc=NULL, CGenericThread::ThreadPriority aPriority=CGenericThread::tpNormal);
Ctor and Dtor ulNumberOfThreads - Number of active threads ulMaxJobsPending - Size of the back queue pInitializeProc - Initialize proc aPriority - Threads priority
try { //Set our name SetName(CThreadPool_Class); //Create the semaphore m_pSemaphore=COSManager::CreateSemaphore(0,m_iMaxJobsPending); //Create the CS m_pCSection=COSManager::CreateCriticalSection(); m_pCSectionCounter=COSManager::CreateCriticalSection(); //Initialize the threads m_bInitialized=SpawnThreads(pInitializeProc, aPriority); } ERROR_HANDLER("CThreadPool")
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |