Method Rent
Rent(SemaphoreSlim)
Synchronously waits to enter the SemaphoreSlim and returns a disposable object that releases the semaphore when disposed.
Declaration
public static IDisposable Rent(this SemaphoreSlim semaphoreSlim)
Parameters
Type | Name | Description |
---|---|---|
SemaphoreSlim | semaphoreSlim | The semaphore to rent. |
Returns
Type | Description |
---|---|
IDisposable | A disposable object that releases the semaphore when disposed. |