Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

SctService::WorkerGroup< T >::Worker Class Reference

Inner class to hold thread specific stuff. More...

#include <WorkerGroup.h>

Collaboration diagram for SctService::WorkerGroup< T >::Worker:

Collaboration graph
[legend]

Public Member Functions

 Worker (WorkerGroup< DataType > &group)
 Worker (const Worker &w)
void operator() ()
bool busy ()
 Safely get busy status.

bool paused ()
 Safely get paused status.

void setBusy (bool v)
 Safely set busy status.

void setPaused (bool v)
 Safely set paused status.


Data Fields

WorkerGroup< DataType > & group

Private Attributes

boost::mutex m_statusMutex
 permits status to be locked

volatile bool m_busy
 true when actively working

volatile bool m_paused
 true if paused


Detailed Description

template<class T>
class SctService::WorkerGroup< T >::Worker

Inner class to hold thread specific stuff.

Definition at line 112 of file WorkerGroup.h.


Member Function Documentation

template<class W>
bool SctService::WorkerGroup< W >::Worker::busy  )  [inline]
 

Safely get busy status.

Definition at line 458 of file WorkerGroup.h.

References SctService::WorkerGroup< T >::Worker::m_busy, and SctService::WorkerGroup< T >::Worker::m_statusMutex.

template<class W>
bool SctService::WorkerGroup< W >::Worker::paused  )  [inline]
 

Safely get paused status.

Definition at line 465 of file WorkerGroup.h.

References SctService::WorkerGroup< T >::Worker::m_paused, and SctService::WorkerGroup< T >::Worker::m_statusMutex.

template<class W>
void SctService::WorkerGroup< W >::Worker::setBusy bool  v  ) 
 

Safely set busy status.

Definition at line 472 of file WorkerGroup.h.

References SctService::WorkerGroup< T >::Worker::m_busy, and SctService::WorkerGroup< T >::Worker::m_statusMutex.

Referenced by SctService::WorkerGroup< T >::popAndWork().

template<class W>
void SctService::WorkerGroup< W >::Worker::setPaused bool  v  )  [inline]
 

Safely set paused status.

Definition at line 479 of file WorkerGroup.h.

References SctService::WorkerGroup< T >::Worker::m_paused, and SctService::WorkerGroup< T >::Worker::m_statusMutex.


Field Documentation

template<class T>
volatile bool SctService::WorkerGroup< T >::Worker::m_busy [private]
 

true when actively working

Definition at line 135 of file WorkerGroup.h.

Referenced by SctService::WorkerGroup< T >::Worker::busy(), and SctService::WorkerGroup< T >::Worker::setBusy().

template<class T>
volatile bool SctService::WorkerGroup< T >::Worker::m_paused [private]
 

true if paused

Definition at line 136 of file WorkerGroup.h.

Referenced by SctService::WorkerGroup< T >::Worker::paused(), and SctService::WorkerGroup< T >::Worker::setPaused().

template<class T>
boost::mutex SctService::WorkerGroup< T >::Worker::m_statusMutex [private]
 

permits status to be locked

Definition at line 134 of file WorkerGroup.h.

Referenced by SctService::WorkerGroup< T >::Worker::busy(), SctService::WorkerGroup< T >::Worker::paused(), SctService::WorkerGroup< T >::Worker::setBusy(), and SctService::WorkerGroup< T >::Worker::setPaused().


The documentation for this class was generated from the following file:
Generated on Thu Dec 22 20:23:35 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5