Interface ICoalescingQueue
- Namespace
- CounterpointCollective.Collections
- Assembly
- CounterpointCollective.CoalescingQueue.dll
public interface ICoalescingQueue
- Extension Methods
Properties
Completion
Initiates completion of the queue.
Task Completion { get; }
Property Value
Remarks
After calling this method, the queue enters a completing state. Completion will transition to the completed state once all nodes that were already enqueued at the moment of calling Complete() have been fully processed.
Calling Enqueue() after calling Complete() will cause an exception.
Methods
AwaitQueueProcessed()
ValueTask AwaitQueueProcessed()
Returns
Complete()
void Complete()
ProcessPendingAsync(int)
Dequeues and processes pending completed nodes in the queue.
ValueTask<bool> ProcessPendingAsync(int maxToDispatch = -1)
Parameters
maxToDispatchintThe maximum amount of items to dispatch. If -1, all pending items are dispatched.
Returns
- ValueTask<bool>
false when dispatch was already busy. Otherwise whether maxToDispatch was hit and there was more work.
StartProcessPending()
void StartProcessPending()
Events
OnNodeCompleted
event Action? OnNodeCompleted