ThreadPool Class Reference

#include <threadpool.h>

Inheritance diagram for ThreadPool:

HttpServer

List of all members.


Detailed Description

Definition at line 103 of file threadpool.h.


Public Member Functions

 ThreadPool (const QString &sName)
virtual ~ThreadPool ()
WorkerThreadGetWorkerThread ()

Protected Member Functions

void InitializeThreads ()
WorkerThreadAddWorkerThread (bool bMakeAvailable, long nTimeout)
void ThreadAvailable (WorkerThread *pThread)
void ThreadTerminating (WorkerThread *pThread)
virtual WorkerThreadCreateWorkerThread (ThreadPool *, const QString &sName)=0

Protected Attributes

QString m_sName
QMutex m_mList
QWaitCondition m_threadAvail
WorkerThreadList m_lstThreads
WorkerThreadList m_lstAvailableThreads
int m_nInitialThreadCount
int m_nMaxThreadCount
long m_nIdleTimeout

Friends

class WorkerThread

Constructor & Destructor Documentation

ThreadPool::ThreadPool ( const QString &  sName  ) 

Definition at line 246 of file threadpool.cpp.

ThreadPool::~ThreadPool (  )  [virtual]

Definition at line 265 of file threadpool.cpp.


Member Function Documentation

void ThreadPool::InitializeThreads (  )  [protected]

Definition at line 296 of file threadpool.cpp.

Referenced by HttpServer::HttpServer().

WorkerThread * ThreadPool::AddWorkerThread ( bool  bMakeAvailable,
long  nTimeout 
) [protected]

Definition at line 359 of file threadpool.cpp.

Referenced by GetWorkerThread(), and InitializeThreads().

void ThreadPool::ThreadAvailable ( WorkerThread pThread  )  [protected]

Definition at line 414 of file threadpool.cpp.

Referenced by WorkerThread::run().

void ThreadPool::ThreadTerminating ( WorkerThread pThread  )  [protected]

Definition at line 427 of file threadpool.cpp.

Referenced by WorkerThread::run().

virtual WorkerThread* ThreadPool::CreateWorkerThread ( ThreadPool ,
const QString &  sName 
) [protected, pure virtual]

Implemented in HttpServer.

Referenced by AddWorkerThread().

WorkerThread * ThreadPool::GetWorkerThread (  ) 

Definition at line 311 of file threadpool.cpp.

Referenced by HttpServer::newConnection().


Friends And Related Function Documentation

friend class WorkerThread [friend]

Definition at line 105 of file threadpool.h.


Member Data Documentation

QString ThreadPool::m_sName [protected]

Definition at line 109 of file threadpool.h.

Referenced by AddWorkerThread(), and ThreadPool().

QMutex ThreadPool::m_mList [protected]

Definition at line 111 of file threadpool.h.

Referenced by AddWorkerThread(), GetWorkerThread(), ThreadAvailable(), and ThreadTerminating().

QWaitCondition ThreadPool::m_threadAvail [protected]

Definition at line 113 of file threadpool.h.

Referenced by AddWorkerThread(), GetWorkerThread(), and ThreadAvailable().

Definition at line 115 of file threadpool.h.

Referenced by AddWorkerThread(), GetWorkerThread(), ThreadPool(), and ~ThreadPool().

Definition at line 118 of file threadpool.h.

Referenced by InitializeThreads(), and ThreadPool().

Definition at line 119 of file threadpool.h.

Referenced by GetWorkerThread(), and ThreadPool().

long ThreadPool::m_nIdleTimeout [protected]

Definition at line 120 of file threadpool.h.

Referenced by GetWorkerThread(), and ThreadPool().


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

Generated on Sat Dec 18 05:16:11 2010 for MythTV by  doxygen 1.5.5