LockUtilities..::..AcquireAsync Method

Acquires a semaphore as an asynchronous operation. When this is disposed, the semaphore will be released.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


public static Task<IDisposable> AcquireAsync(
	SemaphoreSlim semaphore
)
Public Shared Function AcquireAsync ( _
	semaphore As SemaphoreSlim _
) As Task(Of IDisposable)

Parameters

semaphore
Type: SemaphoreSlim
The semaphore.

Return Value

Task<IDisposable>.