TDME2 1.9.121
|
Barrier implementation. More...
#include <tdme/os/threading/Barrier.h>
Public Member Functions | |
Barrier (const string &name, const unsigned int count) | |
Public constructor. More... | |
~Barrier () | |
Destroys the barrier. More... | |
bool | wait () |
Waits on barrier. More... | |
Private Attributes | |
string | name |
unsigned int | count |
volatile unsigned int | entered |
volatile unsigned int | exited |
Mutex | m |
Condition | c |
Barrier | ( | const string & | name, |
const unsigned int | count | ||
) |
Public constructor.
name | name |
count | Number of threads that need to "wait" on barrier to complete barrier |
Definition at line 12 of file Barrier.cpp.
~Barrier | ( | ) |
Destroys the barrier.
Definition at line 17 of file Barrier.cpp.
bool wait | ( | ) |
Waits on barrier.
Definition at line 31 of file Barrier.cpp.