Nito.AsyncEx.AsyncCollection<T>
An async-compatible producer/consumer collection.
Creates a new async-compatible producer/consumer collection wrapping the specified collection and with a maximum element count.
Creates a new async-compatible producer/consumer collection wrapping the specified collection.
Creates a new async-compatible producer/consumer collection with a maximum element count.
public AsyncCollection()
Creates a new async-compatible producer/consumer collection.
Adds an item to the producer/consumer collection. Throws InvalidOperationException if the producer/consumer collection has completed adding or if the item was rejected by the underlying collection. This method may block the calling thread.
Adds an item to the producer/consumer collection. Throws InvalidOperationException if the producer/consumer collection has completed adding or if the item was rejected by the underlying collection. This method may block the calling thread.
Adds an item to the producer/consumer collection. Throws InvalidOperationException if the producer/consumer collection has completed adding or if the item was rejected by the underlying collection.
Adds an item to the producer/consumer collection. Throws InvalidOperationException if the producer/consumer collection has completed adding or if the item was rejected by the underlying collection.
Synchronously marks the producer/consumer collection as complete for adding.
Provides a (synchronous) consuming enumerable for items in the producer/consumer collection.
Provides a (synchronous) consuming enumerable for items in the producer/consumer queue.
Synchronously waits until an item is available to take. Returns false if the producer/consumer collection has completed adding and there are no more items.
Synchronously waits until an item is available to take. Returns false if the producer/consumer collection has completed adding and there are no more items.
Asynchronously waits until an item is available to take. Returns false if the producer/consumer collection has completed adding and there are no more items.
Asynchronously waits until an item is available to take. Returns false if the producer/consumer collection has completed adding and there are no more items.
Takes an item from the producer/consumer collection. Returns the item. Throws InvalidOperationException if the producer/consumer collection has completed adding and is empty, or if the take from the underlying collection failed. This method may block the calling thread.
Takes an item from the producer/consumer collection. Returns the item. Throws InvalidOperationException if the producer/consumer collection has completed adding and is empty, or if the take from the underlying collection failed. This method may block the calling thread.
Takes an item from the producer/consumer collection. Returns the item. Throws InvalidOperationException if the producer/consumer collection has completed adding and is empty, or if the take from the underlying collection failed.
Takes an item from the producer/consumer collection. Returns the item. Throws InvalidOperationException if the producer/consumer collection has completed adding and is empty, or if the take from the underlying collection failed.