C# Class WinRTXamlToolkit.Async.AsyncSemaphore

Limits the number of awaiters that can access a resource or pool of resources concurrently.
Datei anzeigen Open project: xyzzer/WinRTXamlToolkit Class Usage Examples

Public Methods

Method Description
AsyncSemaphore ( int initialCount ) : System

Initializes a new instance of the AsyncSemaphore class, reserving some concurrent entries.

Release ( ) : void

Exits the semaphore and returns the previous count.

WaitAsync ( ) : System.Threading.Tasks.Task

Blocks the current awaiter until the semaphore receives a signal.

Method Details

AsyncSemaphore() public method

Initializes a new instance of the AsyncSemaphore class, reserving some concurrent entries.
initialCount
public AsyncSemaphore ( int initialCount ) : System
initialCount int The initial count.
return System

Release() public method

Exits the semaphore and returns the previous count.
public Release ( ) : void
return void

WaitAsync() public method

Blocks the current awaiter until the semaphore receives a signal.
public WaitAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task