AsyncSharedLock
Represents a lock that can be acquired in exclusive or weak mode.
Gets the maximum number of locks that can be obtained simultaneously.
Indicates that the lock is acquired in exclusive or shared mode.
Indicates that the lock is acquired in exclusive mode.
Gets the number of shared locks that can be acquired.
Initializes a new shared lock.
Entres the lock asynchronously.
Entres the lock asynchronously.
Releases the acquired weak lock or downgrade exclusive lock to the weak lock.
Release the acquired lock.
Attempts to obtain lock synchronously without blocking caller thread.
public ValueTask<bool> TryAcquireAsync(bool strongLock, TimeSpan timeout, CancellationToken token = default)
Attempts to enter the lock asynchronously, with an optional time-out.