SemaphoreSlim.Wait Method (Int32, CancellationToken)
Assembly: mscorlib (in mscorlib.dll)
The number of milliseconds to wait, or Infinite(-1) to wait indefinitely.
cancellationToken was canceled.
millisecondsTimeout is a negative number other than -1, which represents an infinite time-out.
If a thread or task is able to enter the semaphore, it decrements the CurrentCount property by one.
If cancellationToken is cancelled, or if a thread or task is blocked when calling CurrentCount property isn’t decremented. If cancellationToken is cancelled, the method throws an OperationCanceledException exception.and the time-out interval specified by millisecondsTimeout expires, the thread or task doesn’t enter the semaphore, and the
Available since 8
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Available since 8.1