Skip to content

M_CodeJam_Threading_AsyncLock_AcquireAsync_3

Andrew Koryavchenko edited this page Jun 17, 2018 · 1 revision

AsyncLock.AcquireAsync Method (CancellationToken)

Acquires async lock.

Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public Task<IDisposable> AcquireAsync(
	CancellationToken cancellation
)

VB

Public Function AcquireAsync ( 
	cancellation As CancellationToken
) As Task(Of IDisposable)

F#

member AcquireAsync : 
        cancellation : CancellationToken -> Task<IDisposable> 

Parameters

 

cancellation
Type: System.Threading.CancellationToken
The CancellationToken token to observe.

Return Value

Type: Task(IDisposable)
A task that returns IDisposable to release the lock.

Exceptions

 

Exception Condition
OperationCanceledException The token has had cancellation requested.

See Also

Reference

AsyncLock Class
AcquireAsync Overload
CodeJam.Threading Namespace

Clone this wiki locally