blocxx
BLOCXX_NAMESPACE::ThreadBarrierImpl::SubBarrier Struct Reference

This code is inspired by ACE, by Douglas C. More...

Public Member Functions

 SubBarrier ()
 

Public Attributes

UInt32 m_waitingCount
 The number of waiting threads.
 
Condition m_cond
 Condition for threads to wait on.
 

Detailed Description

This code is inspired by ACE, by Douglas C.

Schmidt schmi.nosp@m.dt@c.nosp@m.s.wus.nosp@m.tl.e.nosp@m.du File Barrier.h and Barrier.cpp We keep two SubBarriers, one for the first "generation" of waiters, and one for the next "generation" of waiters. This efficiently solves the problem of what to do if all the first generation waiters don't leave the barrier before one of the threads calls wait() again (i.e., starts up the next generation barrier).

Definition at line 113 of file ThreadBarrier.cpp.

Constructor & Destructor Documentation

◆ SubBarrier()

BLOCXX_NAMESPACE::ThreadBarrierImpl::SubBarrier::SubBarrier ( )
inline

Definition at line 115 of file ThreadBarrier.cpp.

References m_waitingCount.

Member Data Documentation

◆ m_cond

Condition BLOCXX_NAMESPACE::ThreadBarrierImpl::SubBarrier::m_cond

Condition for threads to wait on.

Definition at line 119 of file ThreadBarrier.cpp.

Referenced by BLOCXX_NAMESPACE::ThreadBarrierImpl::wait().

◆ m_waitingCount

UInt32 BLOCXX_NAMESPACE::ThreadBarrierImpl::SubBarrier::m_waitingCount

The number of waiting threads.

Definition at line 117 of file ThreadBarrier.cpp.

Referenced by SubBarrier(), and BLOCXX_NAMESPACE::ThreadBarrierImpl::wait().


The documentation for this struct was generated from the following file: