AsyncLockTryEnterAsync Method

Attempts to obtain exclusive access to the lock.

Definition

Namespace: Gemstone.Threading
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.155 -- Release Build+fbb54a9347e09f19695376cbf86e09a9ff9ee9ca
public Task<IDisposable> TryEnterAsync()

Return Value

TaskIDisposable
A task that, if cancelled, indicates the lock was not taken, and must be awaited to obtain the token that will release the lock on Dispose.

Exceptions

TaskCanceledExceptionThe lock could not be taken.

See Also