library of assembled shared sources

http://lass.cocamware.com

lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread Class Reference

Inheritance diagram for lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread:

Inheritance graph
[legend]
Collaboration diagram for lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread:

Collaboration graph
[legend]

Public Types

enum  { anyProcessor = unsigned(-1) }

Public Member Functions

 ConsumerThread (const TConsumer &consumer, TSelf &pool, const char *name)
void run ()
void join ()
void bind (unsigned processor)
 bind this thread to a processor (this as in this-pointer)

Static Public Member Functions

static void sleep (unsigned long milliseconds)
static void yield ()
static void bindCurrent (unsigned processor)
 bind current thread to a processor (current as in callee's context)

Private Member Functions

void doRun ()

Private Attributes

TConsumer consumer_
TSelfpool_

Friends

class impl::ThreadInternal

Detailed Description

template<typename TaskType = Callback0, typename ConsumerType = DefaultConsumer<TaskType>, typename IdlePolicy = Signaled, template< typename, typename, typename > class ParticipationPolicy = NotParticipating>
class lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread

Definition at line 284 of file thread_pool.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
anyProcessor  argument for Thread::bind to unbind the thread so it runs on any processor

Definition at line 195 of file thread.h.


Constructor & Destructor Documentation

template<typename T , typename C , typename IP , template< typename, typename, typename > class PP>
lass::util::ThreadPool< T, C, IP, PP >::ConsumerThread::ConsumerThread ( const TConsumer consumer,
TSelf pool,
const char *  name 
) [inline]

Definition at line 275 of file thread_pool.inl.


Member Function Documentation

template<typename T , typename C , typename IP , template< typename, typename, typename > class PP>
void lass::util::ThreadPool< T, C, IP, PP >::ConsumerThread::doRun (  )  [inline, private, virtual]

void lass::util::Thread::run (  )  [inherited]

void lass::util::Thread::join (  )  [inherited]

void lass::util::Thread::bind ( unsigned  processor  )  [inherited]

bind this thread to a processor (this as in this-pointer)

Definition at line 228 of file thread.cpp.

References lass::util::impl::ThreadInternal::bind(), LASS_ASSERT, and lass::util::Thread::pimpl_.

Referenced by lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::startThreads().

void lass::util::Thread::sleep ( unsigned long  milliseconds  )  [static, inherited]

Definition at line 234 of file thread.cpp.

void lass::util::Thread::yield (  )  [static, inherited]

Definition at line 239 of file thread.cpp.

void lass::util::Thread::bindCurrent ( unsigned  processor  )  [static, inherited]


Friends And Related Function Documentation

friend class impl::ThreadInternal [friend, inherited]

Definition at line 216 of file thread.h.


Field Documentation

template<typename TaskType = Callback0, typename ConsumerType = DefaultConsumer<TaskType>, typename IdlePolicy = Signaled, template< typename, typename, typename > class ParticipationPolicy = NotParticipating>
TConsumer lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::consumer_ [private]

template<typename TaskType = Callback0, typename ConsumerType = DefaultConsumer<TaskType>, typename IdlePolicy = Signaled, template< typename, typename, typename > class ParticipationPolicy = NotParticipating>
TSelf& lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::pool_ [private]


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

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