A synchronization primitive that causes a predefined number of threads to all wait before continuing. More...
#include <barrier.h>
Public Member Functions | |
Barrier (const Int32 &SynchThreadCount) | |
Constructor. More... | |
void | SetThreadSyncCount (Int32 NewCount) |
Set the Thread count Atomically. More... | |
bool | Wait () |
Wait until the specified number of threads reach this point. More... | |
Protected Attributes | |
Int32 | IsBlocking |
Does calling wait on this barrier block at presemt. More... | |
Int32 | ThreadCurrent |
The number of threads currently waiting. | |
Int32 | ThreadGoal |
The number of threads to have wait. | |
A synchronization primitive that causes a predefined number of threads to all wait before continuing.
Mezzanine::Threading::Barrier::Barrier | ( | const Int32 & | SynchThreadCount | ) |
Constructor.
SynchThreadCount | The amount of threads that this should wait for. If 0 is passed all threads waiting advance. |
Definition at line 55 of file barrier.cpp.
void Mezzanine::Threading::Barrier::SetThreadSyncCount | ( | Int32 | NewCount | ) |
Set the Thread count Atomically.
NewCount | The new amounf threads to sync. |
Definition at line 84 of file barrier.cpp.
bool Mezzanine::Threading::Barrier::Wait | ( | ) |
Wait until the specified number of threads reach this point.
Definition at line 61 of file barrier.cpp.
|
protected |