Nito.AsyncEx.AsyncSemaphore
An async-compatible semaphore. Alternatively, you could use SemaphoreSlim.
Gets the number of slots currently available on this semaphore. This member is seldom used; code using this member has a high possibility of race conditions.
Gets a semi-unique identifier for this asynchronous semaphore.
Creates a new async-compatible semaphore with the specified initial count.
Synchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
Synchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
Asynchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
Asynchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
Releases the semaphore.
Releases the semaphore.
Synchronously waits for a slot in the semaphore to be available. This method may block the calling thread.
Synchronously waits for a slot in the semaphore to be available. This method may block the calling thread.
Asynchronously waits for a slot in the semaphore to be available.
Asynchronously waits for a slot in the semaphore to be available.