Blocks the current thread until the
CountdownEvent is set, using a
32-bit signed integer to measure the time interval, while observing a
CancellationToken.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function Wait ( _
millisecondsTimeout As Integer, _
cancellationToken As CancellationToken _
) As Boolean |
Return Value
true if the
CountdownEvent was set; otherwise,
false.
Exceptions
| Exception | Condition |
|---|
| System..::.ArgumentOutOfRangeException | millisecondsTimeout is a
negative number other than -1, which represents an infinite time-out. |
| System..::.ObjectDisposedException | The current instance has already been
disposed. |
| System..::.OperationCanceledException | cancellationToken has
been canceled. |
See Also