library of assembled shared sources |
http://lass.cocamware.com |
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_ |
TSelf & | pool_ |
Friends | |
class | impl::ThreadInternal |
Definition at line 284 of file thread_pool.h.
anonymous enum [inherited] |
anyProcessor | argument for Thread::bind to unbind the thread so it runs on any processor |
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.
void lass::util::ThreadPool< T, C, IP, PP >::ConsumerThread::doRun | ( | ) | [inline, private, virtual] |
Implements lass::util::Thread.
Definition at line 293 of file thread_pool.inl.
References lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::abort_, lass::util::atomicDecrement(), lass::util::atomicIncrement(), lass::util::experimental::RemoteExceptionBase::clone(), lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::consumer_, lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::error_, LASS_UTIL_THREAD_POOL_CATCH_AND_WRAP, lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::numRunningTasks_, lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::numWaitingTasks_, lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::pool_, lass::stde::lock_free_queue< T, FixedAllocator >::pop(), lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::shutDown_, and lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::waitingTasks_.
void lass::util::Thread::run | ( | ) | [inherited] |
Definition at line 214 of file thread.cpp.
References LASS_ASSERT, lass::util::Thread::pimpl_, and lass::util::impl::ThreadInternal::run().
Referenced by lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::startThreads().
void lass::util::Thread::join | ( | ) | [inherited] |
Definition at line 220 of file thread.cpp.
References lass::util::impl::ThreadInternal::join(), LASS_ASSERT, and lass::util::Thread::pimpl_.
Referenced by lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::stopThreads().
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] |
bind current thread to a processor (current as in callee's context)
Definition at line 246 of file thread.cpp.
Referenced by lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::SelfParticipating(), and lass::util::SelfParticipating< TaskType, ConsumerType, IdlePolicy >::~SelfParticipating().
friend class impl::ThreadInternal [friend, inherited] |
TConsumer lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::consumer_ [private] |
Definition at line 290 of file thread_pool.h.
Referenced by lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::doRun().
TSelf& lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::pool_ [private] |
Definition at line 291 of file thread_pool.h.
Referenced by lass::util::ThreadPool< TaskType, ConsumerType, IdlePolicy, ParticipationPolicy >::ConsumerThread::doRun().
Generated on Mon Nov 10 14:22:17 2008 for Library of Assembled Shared Sources by 1.5.7.1 |