Initializer Constructor
Size of the downward counter.
Derecements the counter.
Decrements the counter by n without blocking.
If the parametric value n is equal to or greater than internal counter, so that the internal counter be equal to or less than zero, everyone who are waiting for the Latch would continue their executions.
Value of the decrement. Default is 1.
Decrements the counter and waits until the counter to be zero.
Decrements the counter by one and blocks the section until internal counter to be zero.
If the the remained counter be zero by this decrement, everyone who are waiting for the Barrier would continue their executions including this one.
Waits until the counter to be zero.
Blocks the function calling until internal counter to be reached to the zero.
Tries to wait until the counter to be zero in timeout.
Attempts to block the function calling until internal counter to be reached to the zero
in timeout. If succeeded to waiting the counter to be reached to the zero, it returns
true
. Otherwise, the Barrier fails to reach to the zero in the given time, the
function gives up the waiting and returns false
.
The maximum miliseconds for waiting.
Whether succeeded to waiting in the given time.
Tries to wait until the counter to be zero in time expiration.
Attempts to block the function calling until internal counter to be reached to the zero
in time expiration. If succeeded to waiting the counter to be reached to the zero, it
returns true
. Otherwise, the Barrier fails to reach to the zero in the given
time, the function gives up the waiting and returns false
.
The maximum time point to wait.
Whether succeeded to waiting in the given time.
Generated using TypeDoc
Barrier for critical sections.
The Barrier class blocks critical sections until the downward counter to be zero. Unlike the Latch class whose downward counter is disposable,
Barrier
can re-use the downward counter repeatedly, resetting counter to be initial value whenever reach to the zero.Jeongho Nam - https://github.com/samchon