Documentation for this section has not yet been entered.
Type Reason Java.Lang.InterruptedException if the current thread was interrupted while waiting Java.Util.Concurrent.BrokenBarrierException if another thread was interrupted or timed out while the current thread was waiting, or the barrier was reset, or the barrier was broken when await was called, or the barrier action (if present) failed due to an exception
Waits until all CyclicBarrier.Parties have invoked await on this barrier.
If the current thread is not the last to arrive then it is disabled for thread scheduling purposes and lies dormant until one of the following things happens:
If the current thread:
If the barrier is CyclicBarrier.Reset while any thread is waiting, or if the barrier CyclicBarrier.IsBroken when await is invoked, or while any thread is waiting, then Java.Util.Concurrent.BrokenBarrierException is thrown.
If any thread is Java.Lang.Thread.Interrupt while waiting, then all other waiting threads will throw Java.Util.Concurrent.BrokenBarrierException and the barrier is placed in the broken state.
If the current thread is the last thread to arrive, and a non-null barrier action was supplied in the constructor, then the current thread runs the action before allowing the other threads to continue. If an exception occurs during the barrier action then that exception will be propagated in the current thread and the barrier is placed in the broken state.