Interface IDistributedLock
Exposes the methods to acquire and release a lock.
Namespace: Silverback.Lock
Assembly: Silverback.Core.dll
Syntax
public interface IDistributedLock
Methods
AcquireAsync(CancellationToken)
Acquires the lock.
Declaration
ValueTask<DistributedLockHandle> AcquireAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A CancellationToken used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| ValueTask<DistributedLockHandle> | A Task representing the asynchronous operation. |