System.Threading.CountdownEvent.Wait Method

Blocks the current thread until the System.Threading.CountdownEvent is set, while observing a System.Threading.CancellationToken.

Syntax

public void Wait (CancellationToken cancellationToken)

Parameters

cancellationToken
The System.Threading.CancellationToken to observe.

Remarks

The caller of this method blocks indefinitely until the current instance is set. The caller will return immediately if the event is currently in a set state. If the System.Threading.CancellationToken being observed is canceled during the wait operation, an OperationCanceledException will be thrown.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0