CARMA C++
carma::util::MultiShotBarrier Class Reference

MultiShotBarrier class. More...

#include <carma/util/MultiShotBarrier.h>

Public Member Functions

 MultiShotBarrier (size_t initialSatisfyCount)
 Constructor. More...
 
 MultiShotBarrier ()
 Default constructor. More...
 
void reset (size_t satisfyCount)
 Reset the satisyCount to reuse barrier. More...
 
void wait ()
 Wait until all other waiters have reached this barrier. More...
 
virtual ~MultiShotBarrier ()
 Destructor. More...
 

Detailed Description

MultiShotBarrier class.

Variant of OneShotBarrier modified to support an arbitrary number of shots with a per-shot satisfy count.

Definition at line 15 of file MultiShotBarrier.h.

Constructor & Destructor Documentation

carma::util::MultiShotBarrier::MultiShotBarrier ( size_t  initialSatisfyCount)
explicit

Constructor.

Parameters
initialSatisfyCountSatisfy count for first wait.
Exceptions
carma::util::IllegalArgumentExceptionif satisfyCount < 1.
See Also
reset
carma::util::MultiShotBarrier::MultiShotBarrier ( )
explicit

Default constructor.

If this constructor is used, the user must call reset with a satisfy count prior to waiting.

virtual carma::util::MultiShotBarrier::~MultiShotBarrier ( )
virtual

Destructor.

Member Function Documentation

void carma::util::MultiShotBarrier::reset ( size_t  satisfyCount)

Reset the satisyCount to reuse barrier.

Parameters
satisfyCountNew satisfy count.
Exceptions
carma::util::ErrorExceptionif there are active waits.
carma::util::IllegalArgumentExceptionif satisfyCount < 1.
void carma::util::MultiShotBarrier::wait ( )

Wait until all other waiters have reached this barrier.


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