Class QueuedSynchronizer
Provides a framework for implementing asynchronous locks and related synchronization primitives that rely on first-in-first-out (FIFO) wait queues.
Inheritance
QueuedSynchronizer
Implements
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public abstract class QueuedSynchronizer : Disposable, ISynchronizer
Remarks
Derived synchronization primitives less efficient in terms of memory pressure when compared with Synchronizer. It provides the individual instance of Task<TResult> under contention for each waiter in the queue.
Methods
| Improve this Doc View SourceCancelSuspendedCallers(CancellationToken)
Cancels all suspended callers.
Declaration
public void CancelSuspendedCallers(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The canceled token. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
Dispose(Boolean)
Releases all resources associated with exclusive lock.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | Indicates whether the Dispose(Boolean) has been called directly or from finalizer. |
Remarks
This method is not thread-safe and may not be used concurrently with other members of this instance.
Explicit Interface Implementations
| Improve this Doc View SourceISynchronizer.HasWaiters
Declaration
bool ISynchronizer.HasWaiters { get; }
Returns
Type | Description |
---|---|
Boolean |