Table of Contents

Class AsyncLock

Namespace
CarrotMQ.Core.Common
Assembly
CarrotMQ.Core.dll

Represents an asynchronous lock that can be used to synchronize access to a shared resource.

public sealed class AsyncLock
Inheritance
AsyncLock
Inherited Members

Constructors

AsyncLock()

public AsyncLock()

Methods

LockAsync()

Asynchronously acquires the lock, returning a disposable object that releases the lock when disposed.

public Task<IDisposable> LockAsync()

Returns

Task<IDisposable>

An awaitable task that yields a disposable object representing the lock scope.