IAsyncBuffer<TInput, TOutput>
Namespace: SnowBank.Linq.Async · interface
Implements: IAsyncTarget<TInput>, IAsyncSource<TOutput>
Defines a producer/consumer buffer queue that can hold several items before blocking the producer
Properties
Capacity
int Capacity { get; }
Returns the maximum capacity of the buffer
Count
int Count { get; }
Returns the current number of items in the buffer
IsConsumerBlocked
bool IsConsumerBlocked { get; }
Returns true if the consumer is blocked (queue is empty)
IsProducerBlocked
bool IsProducerBlocked { get; }
Returns true if the producer is blocked (queue is full)
Methods
DrainAsync
Task DrainAsync()
Wait for all the consumers to drain the queue
Returns: Task that completes when all consumers have drained the queue