TaskUtilities..::..DelaySafe Method (Int32, CancellationToken)
Creates a cancellable task that completes after a specified number of milliseconds. This will not throw an exception if the cancellationToken is triggered or disposed.
Namespace:
Tortuga.AnchorAssembly: Tortuga.Anchor (in Tortuga.Anchor.dll)
Syntax
Parameters
- millisecondsDelay
- Type: Int32
The number of milliseconds to wait before completing the returned task, or -1 to wait indefinitely.
- cancellationToken
- Type: CancellationToken
A cancellation token to observe while waiting for the task to complete.