library of assembled shared sources

http://lass.cocamware.com

lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy > Class Template Reference
[Threading]

implementation of ThreadPool's ParticipationPolicy More...

#include <thread_pool.h>


Protected Member Functions

 SelfParticipating (const ConsumerType &prototype)
 ~SelfParticipating ()
const size_t numDynamicThreads (size_t numThreads) const
template<typename Queue >
bool participate (Queue &queue)

Private Attributes

ConsumerType consumer_


Detailed Description

template<typename TaskType, typename ConsumerType, typename IdlePolicy>
class lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >

implementation of ThreadPool's ParticipationPolicy

See also:
ThreadPool
The control thread participates as producer while waiting to complete all tasks. Is best used when short burst of adding a limited number of tasks to an unlimited queue, followed by a completeAllTasks().

Definition at line 203 of file thread_pool.h.


Constructor & Destructor Documentation

template<typename TaskType , typename ConsumerType , typename IdlePolicy >
lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::SelfParticipating ( const ConsumerType &  prototype  )  [inline, protected]

Definition at line 206 of file thread_pool.h.

References lass::util::Thread::bindCurrent().

template<typename TaskType , typename ConsumerType , typename IdlePolicy >
lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::~SelfParticipating (  )  [inline, protected]


Member Function Documentation

template<typename TaskType , typename ConsumerType , typename IdlePolicy >
const size_t lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::numDynamicThreads ( size_t  numThreads  )  const [inline, protected]

Definition at line 208 of file thread_pool.h.

template<typename TaskType , typename ConsumerType , typename IdlePolicy >
template<typename Queue >
bool lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::participate ( Queue &  queue  )  [inline, protected]


Field Documentation

template<typename TaskType , typename ConsumerType , typename IdlePolicy >
ConsumerType lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::consumer_ [private]


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

Generated on Mon Nov 10 14:22:17 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo