Public Member Functions | List of all members
CyclicBarrier Class Reference

A synchronising barrier that can be configured for an arbitrary number of threads. More...

#include <CyclicBarrier.hpp>

Collaboration diagram for CyclicBarrier:
[legend]

Public Member Functions

 CyclicBarrier (unsigned int count_)
 Create a cyclic barrier with the specified count. More...
 
void countdown ()
 Count down the barrier, blocking if the count has not reached 0. More...
 
void reconfigure (unsigned int count_)
 Reconfigure the latch to count the specified number of times. More...
 

Detailed Description

A synchronising barrier that can be configured for an arbitrary number of threads.

The barrier automatically resets after releasing the threads.

The barrier can be reconfigured for a different number of threads. It is the responsibility of the using code to ensure that the barrier is not being used when reconfigured.

Constructor & Destructor Documentation

◆ CyclicBarrier()

CyclicBarrier ( unsigned int  count_)
inlineexplicit

Create a cyclic barrier with the specified count.

Member Function Documentation

◆ countdown()

void countdown ( )

Count down the barrier, blocking if the count has not reached 0.

◆ reconfigure()

void reconfigure ( unsigned int  count_)
inline

Reconfigure the latch to count the specified number of times.

It is the responsibility of the caller to ensure that the countdown latch is not being used at the time of the reconfiguration.


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