libglass::Barrier Class Reference
#include <barrier.h>
List of all members.
Detailed Description
Barrier class.
Definition at line 258 of file barrier.h.
Constructor & Destructor Documentation
libglass::Barrier::Barrier |
( |
unsigned int |
num, |
|
|
unsigned int |
group = 0 , |
|
|
bool |
active = false | |
|
) |
| | throw (Exception) |
Provides a barrier.
- Parameters:
-
| num | The barrier number. |
| group | The barrier group. |
| active | Should the barrier be considered active before its first synchronization? |
libglass::Barrier::~Barrier |
( |
|
) |
|
Member Function Documentation
bool libglass::Barrier::disable |
( |
void |
|
) |
|
Disables this barrier temporarily. Useful if this node should skip a few barriers, without locking everybody else.
- Return values:
-
- See also:
- sync(), enable().
bool libglass::Barrier::enable |
( |
void |
|
) |
|
Enables this barrier temporarily. Useful if this node should skip a few barriers, without locking everybody else.
- Return values:
-
- See also:
- sync(), disable().
unsigned int libglass::Barrier::getGroup |
( |
void |
|
) |
const [inline] |
Returns the number of this barrier.
- Returns:
- The number of this barrier.
Definition at line 310 of file barrier.h.
unsigned int libglass::Barrier::getNumber |
( |
void |
|
) |
const [inline] |
Returns the number of this barrier.
- Returns:
- The number of this barrier.
Definition at line 304 of file barrier.h.
bool libglass::Barrier::sync |
( |
void |
|
) |
|
Synchronization method.
Blocks until all nodes that own this barrier synchronize. This function is reentrant and can be used by several threads as a synchronization point.
- Return values:
-
| true | If the synchronization was successful. |
| false | Not successfull. The node probably did not synchronize. |
- See also:
- disable(), enable().
Friends And Related Function Documentation
The documentation for this class was generated from the following file: