C# Class WebApplications.Utilities.Threading.AsyncSemaphore

Show file Open project: webappsuk/CoreLibraries Class Usage Examples

Public Methods

Method Description
AsyncSemaphore ( int initialCount = 1 ) : System

Initializes a new instance of the AsyncSemaphore class.

Release ( ) : void

Releases any waiters waiting on the semaphore.

Private Methods

Method Description
WaitAllAsync ( ) : Task
WaitAllAsync ( CancellationToken token ) : Task
WaitAllInternal ( CancellationToken token, [ semaphores ) : Task
WaitAsync ( CancellationToken token = default(CancellationToken) ) : Task

Method Details

AsyncSemaphore() public method

Initializes a new instance of the AsyncSemaphore class.
The count is less than one.
public AsyncSemaphore ( int initialCount = 1 ) : System
initialCount int The initial count.
return System

Release() public method

Releases any waiters waiting on the semaphore.
public Release ( ) : void
return void