software engineer &        architecture


class ThreadPool

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::make::ThreadPool Class Reference

#include <ThreadPool.h>

Inheritance diagram for acdk::make::ThreadPool:

acdk::lang::Thread acdk::lang::Object acdk::lang::Runnable acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

A pool of Threads to handle short requests very quickly without the overhead to create a thread for each request API: ACDK

Roger Rene Kommer (
2005/04/08 10:53:20
See also:

Public Member Functions

 ThreadPool (int minCount, int maxCount)
  • obj ObjectCreator, which must create an instance of PooledThread.

bool shutdown ()
void enqeue (IN(RJob) runnable)
RJob dequeue ()
void doShutdown ()
void setJobResult (JobResult result)
int failedCount ()
void startJob (IN(RJob) runnable)
virtual void run ()
 overload this method to implement working code for this thread

Protected Attributes

RPooledThreadArray _threads
 contains PooledThread

::acdk::util::RVector _queue
 contains Jobs

int _minCount
int _maxCount
int _shutdown
int _failedCount
::acdk::lang::sys::core_semaphore _freeThread

Constructor & Destructor Documentation

acdk::make::ThreadPool::ThreadPool int  minCount,
int  maxCount

  • obj ObjectCreator, which must create an instance of PooledThread.

Member Function Documentation

RJob acdk::make::ThreadPool::dequeue  ) 

void acdk::make::ThreadPool::doShutdown  ) 

void acdk::make::ThreadPool::enqeue IN(RJob runnable  ) 

int acdk::make::ThreadPool::failedCount  )  [inline]

virtual void acdk::make::ThreadPool::run  )  [virtual]

overload this method to implement working code for this thread

Reimplemented from acdk::lang::Thread.

void acdk::make::ThreadPool::setJobResult JobResult  result  ) 

bool acdk::make::ThreadPool::shutdown  )  [inline]

void acdk::make::ThreadPool::startJob IN(RJob runnable  ) 

Member Data Documentation

int acdk::make::ThreadPool::_failedCount [protected]

::acdk::lang::sys::core_semaphore acdk::make::ThreadPool::_freeThread [protected]

int acdk::make::ThreadPool::_maxCount [protected]

int acdk::make::ThreadPool::_minCount [protected]

::acdk::util::RVector acdk::make::ThreadPool::_queue [protected]

contains Jobs

int acdk::make::ThreadPool::_shutdown [protected]

RPooledThreadArray acdk::make::ThreadPool::_threads [protected]

contains PooledThread

Last modified 2005-05-08 18:32 by SYSTEM By Artefaktur, Ing. Bureau Kommer