SemaphoreSlim.WaitAsync Method (CancellationToken)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Asynchronously waits to enter the SemaphoreSlim, while observing a CancellationToken.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- cancellationToken
- Type: System.Threading.CancellationToken
The CancellationToken token to observe.
Return Value
Type: System.Threading.Tasks.TaskA task that will complete when the semaphore has been entered.
| Exception | Condition |
|---|---|
| ObjectDisposedException | The current instance has already been disposed. |
Show: