blocxx
|
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. |
This code is inspired by ACE, by Douglas C.
Schmidt <schmidt@cs.wustl.edu> 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.
BLOCXX_NAMESPACE::ThreadBarrierImpl::SubBarrier::SubBarrier | ( | ) | [inline] |
Definition at line 115 of file ThreadBarrier.cpp.
Condition for threads to wait on.
Definition at line 119 of file ThreadBarrier.cpp.
Referenced by BLOCXX_NAMESPACE::ThreadBarrierImpl::wait().
The number of waiting threads.
Definition at line 117 of file ThreadBarrier.cpp.
Referenced by BLOCXX_NAMESPACE::ThreadBarrierImpl::wait().