LockUtilities..::..AcquireAsync Method
Acquires a semaphore as an asynchronous operation. When this is disposed, the semaphore will be released.
Namespace:
Tortuga.AnchorAssembly: Tortuga.Anchor (in Tortuga.Anchor.dll)
Syntax
public static Task<IDisposable> AcquireAsync( this SemaphoreSlim semaphore, CancellationToken cancellationToken )
<ExtensionAttribute> _ Public Shared Function AcquireAsync ( _ semaphore As SemaphoreSlim, _ cancellationToken As CancellationToken _ ) As Task(Of IDisposable)
Parameters
- semaphore
- Type: SemaphoreSlim
The semaphore.
- cancellationToken
- Type: CancellationToken

