library of assembled shared sources

http://lass.cocamware.com

lass::util::ThreadFun Class Reference

#include <thread_fun.h>

Inheritance diagram for lass::util::ThreadFun:

Inheritance graph
[legend]
Collaboration diagram for lass::util::ThreadFun:

Collaboration graph
[legend]

Public Types

enum  { anyProcessor = unsigned(-1) }

Public Member Functions

 ThreadFun (const Callback0 &fun, ThreadKind kind=threadDetached)
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

Callback0 fun_

Friends

class impl::ThreadInternal

Detailed Description

Definition at line 126 of file thread_fun.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

ThreadFun::ThreadFun ( const Callback0 fun,
ThreadKind  kind = threadDetached 
)

Definition at line 51 of file thread_fun.cpp.


Member Function Documentation

void ThreadFun::doRun (  )  [private, virtual]

Implements lass::util::Thread.

Definition at line 57 of file thread_fun.cpp.

References fun_.

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

Definition at line 132 of file thread_fun.h.

Referenced by doRun().


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