Signals that a participant has reached the barrier and waits for all other participants to reach the barrier as well, using a 32-bit signed integer to measure the timeout, while observing a cancellation token.
- millisecondsTimeout
- The number of milliseconds to wait, or Timeout.Infinite(-1) to wait indefinitely.
- cancellationToken
- The System.Threading.CancellationToken to observe.
if all participants reached the barrier within the specified time; otherwise false
If the cancellationToken was canceled before the signal took effect, then an OperationCanceledException is thrown and the Barrier.ParticipantsRemaining value is not decreased. If the cancellationToken is not canceled or is canceled after the signal takes effect then Barrier.ParticipantsRemaining is decreased and no OperationCanceledException is thrown.