Method | Description | |
---|---|---|
Dispose ( this asyncSemaphore ) : void |
Disposes of managed resources.
|
|
Wait ( this asyncSemaphore, System.TimeSpan timeSpan, |
Synchronously waits for a slot in the semaphore to be available. This method may block the calling thread.
|
|
WaitAsync ( this asyncSemaphore, System.TimeSpan timeSpan, |
Asynchronously waits for a slot in the semaphore to be available. This method may block the calling thread.
|
public static Dispose ( this asyncSemaphore ) : void | ||
asyncSemaphore | this | The |
return | void |
public static Wait ( this asyncSemaphore, System.TimeSpan timeSpan, |
||
asyncSemaphore | this | The |
timeSpan | System.TimeSpan | A TimeSpan for which to wait. |
cancellationToken | The cancellation token used to cancel the wait. If this is already set, then this method will attempt to take the slot immediately (succeeding if a slot is currently available). | |
return | bool |
public static WaitAsync ( this asyncSemaphore, System.TimeSpan timeSpan, |
||
asyncSemaphore | this | The |
timeSpan | System.TimeSpan | A TimeSpan for which to wait. |
cancellationToken | The cancellation token used to cancel the wait. If this is already set, then this method will attempt to take the slot immediately (succeeding if a slot is currently available). | |
return | Task |