Method | Description | |
---|---|---|
AsyncLock ( ) : System |
Creates a new async-compatible mutual exclusion lock.
|
|
AsyncLock ( IAsyncWaitQueue |
Creates a new async-compatible mutual exclusion lock using the specified wait queue.
|
|
Lock ( ) : IDisposable |
Synchronously acquires the lock. Returns a disposable that releases the lock when disposed. This method may block the calling thread.
|
|
Lock ( |
Synchronously acquires the lock. Returns a disposable that releases the lock when disposed. This method may block the calling thread.
|
|
LockAsync ( ) : AwaitableDisposable |
Asynchronously acquires the lock. Returns a disposable that releases the lock when disposed.
|
|
LockAsync ( |
Asynchronously acquires the lock. Returns a disposable that releases the lock when disposed.
|
Method | Description | |
---|---|---|
ReleaseLock ( ) : void |
Releases the lock.
|
public AsyncLock ( IAsyncWaitQueue |
||
queue | IAsyncWaitQueue |
The wait queue used to manage waiters. |
return | System |
public Lock ( |
||
cancellationToken | The cancellation token used to cancel the lock. If this is already set, then this method will attempt to take the lock immediately (succeeding if the lock is currently available). | |
return | IDisposable |
public LockAsync ( |
||
cancellationToken | The cancellation token used to cancel the lock. If this is already set, then this method will attempt to take the lock immediately (succeeding if the lock is currently available). | |
return | AwaitableDisposable |