PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Attributes | List of all members
PQueuedThreadPool< Work_T >::QueuedWorkerThread Class Reference

`#include <threadpool.h>`

Inheritance diagram for PQueuedThreadPool< Work_T >::QueuedWorkerThread:
[legend]
Collaboration diagram for PQueuedThreadPool< Work_T >::QueuedWorkerThread:
[legend]

## Public Member Functions
| QueuedWorkerThread (PThreadPool< Work_T > &pool, PThread::Priority priority=PThread::NormalPriority, const char *threadName=NULL)
| ~QueuedWorkerThread ()
void | AddWork (Work_T *work)
void | RemoveWork (Work_T *)
unsigned | GetWorkSize () const
void | Main ()
void | Shutdown ()

## Protected Types
typedef std::queue< Work_T * > | Queue

## Protected Attributes
Queue | m_queue
PMutex | m_mutex
PSemaphore | m_available
Protected Attributes inherited from PThreadPool< Work_T >::WorkerThread
PThreadPool & | m_pool

## Additional Inherited Members
Protected Member Functions inherited from PThreadPool< Work_T >::WorkerThread
| WorkerThread (PThreadPool &pool, Priority priority=NormalPriority, const char *threadName=NULL)

## Member Typedef Documentation

template<class Work_T >

typedef std::queue<Work_T *> PQueuedThreadPool< Work_T >::QueuedWorkerThread::Queue
| protected

## Constructor & Destructor Documentation

template<class Work_T >

PQueuedThreadPool< Work_T >::QueuedWorkerThread::QueuedWorkerThread | ( | PThreadPool< Work_T > & | pool,
|  | PThread::Priority | priority = `PThread::NormalPriority`,
|  | const char * | threadName = `NULL`
| ) |  |
| inline

template<class Work_T >

PQueuedThreadPool< Work_T >::QueuedWorkerThread::~QueuedWorkerThread | ( |  | ) |
| inline

## Member Function Documentation

template<class Work_T >

void PQueuedThreadPool< Work_T >::QueuedWorkerThread::AddWork | ( | Work_T * | work | ) |
| inline virtual

Implements PThreadPool< Work_T >::WorkerThread.

References PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_available, PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_mutex, PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_queue, and PSemaphore::Signal().

template<class Work_T >

unsigned PQueuedThreadPool< Work_T >::QueuedWorkerThread::GetWorkSize | ( |  | ) | const
| inline

References PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_queue.

template<class Work_T >

void PQueuedThreadPool< Work_T >::QueuedWorkerThread::Main | ( |  | ) |
| inline virtual

Implements PThreadPool< Work_T >::WorkerThread.

References PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_available, PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_mutex, PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_queue, PThreadPool< Work_T >::RemoveWork(), and PSemaphore::Wait().

template<class Work_T >

void PQueuedThreadPool< Work_T >::QueuedWorkerThread::RemoveWork | ( | Work_T * |  | ) |
| inline virtual

Implements PThreadPool< Work_T >::WorkerThread.

References PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_mutex, and PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_queue.

template<class Work_T >

void PQueuedThreadPool< Work_T >::QueuedWorkerThread::Shutdown | ( |  | ) |
| inline

References PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_available, and PSemaphore::Signal().

## Member Data Documentation

template<class Work_T >

PSemaphore PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_available
| protected

Referenced by PQueuedThreadPool< Work_T >::QueuedWorkerThread::AddWork(), PQueuedThreadPool< Work_T >::QueuedWorkerThread::Main(), and PQueuedThreadPool< Work_T >::QueuedWorkerThread::Shutdown().

template<class Work_T >

PMutex PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_mutex
| protected

Referenced by PQueuedThreadPool< Work_T >::QueuedWorkerThread::AddWork(), PQueuedThreadPool< Work_T >::QueuedWorkerThread::Main(), and PQueuedThreadPool< Work_T >::QueuedWorkerThread::RemoveWork().

template<class Work_T >

Queue PQueuedThreadPool< Work_T >::QueuedWorkerThread::m_queue
| protected

Referenced by PQueuedThreadPool< Work_T >::QueuedWorkerThread::AddWork(), PQueuedThreadPool< Work_T >::QueuedWorkerThread::GetWorkSize(), PQueuedThreadPool< Work_T >::QueuedWorkerThread::Main(), and PQueuedThreadPool< Work_T >::QueuedWorkerThread::RemoveWork().

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

- threadpool.h