Class CThreadPool::
CThreadPool()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: CThreadPoolNext page: ~CThreadPool    Show member index
Public Constructor Declared in:
ThreadPool.h

'Declaration' icon -- Shortcut to top of page. Declaration

CThreadPool(
    unsigned long ulNumberOfThreads,
    unsigned long ulMaxJobsPending=THREAD_POOL_DEFAULT_JOBS,
    LPInitializePoolProc pInitializeProc=NULL,
    CGenericThread::ThreadPriority aPriority=CGenericThread::tpNormal);

'Description' icon -- Shortcut to top of page. Description

Ctor and Dtor ulNumberOfThreads - Number of active threads ulMaxJobsPending - Size of the back queue pInitializeProc - Initialize proc aPriority - Threads priority

'Initializer Override(s)' icon -- Shortcut to top of page. Initializer Override(s)

CErrorHandler()
m_ulThreadCount(
ulNumberOfThreads)    
m_pSemaphore(
NULL)    
m_ppThreads(
NULL)    
m_pCSection(
NULL)    
m_ulJobsCount(
0)    
m_ppThreadData(
NULL)    
m_iMaxJobsPending(
ulMaxJobsPending)    
m_pCSectionCounter(
NULL)    
m_iRunningThreads(
0)    
m_bInitialized(
FALSE)    
m_dwSleepInterval(
1)    
m_bDrop(
FALSE)    

'Function Body' icon -- Shortcut to top of page. Function Body

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")

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CErrorHandler  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.