OW_NAMESPACE::ThreadBarrier Class Reference

The ThreadBarrier class is used to synchronize threads. More...

#include <OW_ThreadBarrier.hpp>

Collaboration diagram for OW_NAMESPACE::ThreadBarrier:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ThreadBarrier (UInt32 threshold)
 Constructor.
void wait ()
 Synchronize participating threads at the barrier.
 ~ThreadBarrier ()
 ThreadBarrier (const ThreadBarrier &x)
ThreadBarrieroperator= (const ThreadBarrier &x)

Private Attributes

IntrusiveReference< ThreadBarrierImplm_impl

Detailed Description

The ThreadBarrier class is used to synchronize threads.

Each thread that calls wait() will block until threshold number of threads has called wait() This class is freely copyable. All copies reference the same underlying implementation.

Definition at line 52 of file OW_ThreadBarrier.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::ThreadBarrier::ThreadBarrier UInt32  threshold  ) 
 

Constructor.

Parameters:
threshold The number of threads that must call wait() before any of them successfully return from the call. The value specified by threshold must be greater than zero.
Exceptions:
ThreadBarrierException if the underlying implementation fails.

Definition at line 161 of file OW_ThreadBarrier.cpp.

References OW_ASSERT.

OW_NAMESPACE::ThreadBarrier::~ThreadBarrier  ) 
 

Definition at line 172 of file OW_ThreadBarrier.cpp.

OW_NAMESPACE::ThreadBarrier::ThreadBarrier const ThreadBarrier x  ) 
 

Definition at line 176 of file OW_ThreadBarrier.cpp.


Member Function Documentation

ThreadBarrier & OW_NAMESPACE::ThreadBarrier::operator= const ThreadBarrier x  ) 
 

Definition at line 181 of file OW_ThreadBarrier.cpp.

References m_impl.

void OW_NAMESPACE::ThreadBarrier::wait  ) 
 

Synchronize participating threads at the barrier.

The calling thread shall block until the required number of threads have called wait().

Exceptions:
ThreadBarrierException if the underlying implementation fails.

Definition at line 167 of file OW_ThreadBarrier.cpp.

References m_impl.

Referenced by OW_NAMESPACE::PollingManagerThread::run(), OW_NAMESPACE::IndicationServerImplThread::run(), OW_NAMESPACE::Thread::start(), OW_NAMESPACE::Thread::threadRunner(), and OW_NAMESPACE::IndicationServerImplThread::waitUntilReady().


Member Data Documentation

IntrusiveReference<ThreadBarrierImpl> OW_NAMESPACE::ThreadBarrier::m_impl [private]
 

Definition at line 78 of file OW_ThreadBarrier.hpp.

Referenced by operator=(), and wait().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:14:43 2006 for openwbem by  doxygen 1.4.6