Barrier with changeable threshold. More...
#include <FXBarrier.h>
Barrier with changeable threshold.
A Barrier holds back threads arriving at the barrier, until the number of threads exceeds some threshold (quorum), after which all threads can progress. The Barrier can be broken in two additional ways. First, the threshold value could be changed to a number lower than the currently waiting number of threads. Second, the waiting threads could be released unconditionally, without reaching quorum. Since there must be at least one thread, the theshold value should be at least 1. Deleting the barrier while threads are blocked in not allowed.
Release all waiting threads unconditionally; all waiting threads will break through the barrier and proceed, even if the threshold was not exceeded.
Return true if any threads were waiting.
Change threshold to thr, possibly releasing all waiting threads.
Return true if current count now exceeds the threshold.
Return the threshold, i.e.
number at which the barrier breaks through.
Wait for all threads to hit the barrier.
Returns true for one thread, false for all other threads.