You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it's possible to have an IAsyncEnumerable<T> method on AsyncProducerConsumerQueue<T> so that I can do this instead.
awaitforeach(var item in items.DequeueItemsAsync()){}
My only qualms with the the OutputAvailable/Dequeue approach is that in between the 2 methods, another thread could theoretically empty the queue. Anyway, thank you for this awesome library.
The text was updated successfully, but these errors were encountered:
Provocative thoughts: Is there any functionality which AsyncProducerConsumerQueue<T> provides on top of what Channels provide? Should AsyncProducerConsumerQueue<T> be deprecated in favour of channels?
For the last couple of years, I've been steering everyone I can towards Channels. I wouldn't say AsyncProducerConsumerQueue<T> is deprecated (it's still supported), but Channels is faster and has full support for modern techniques like async streams. I mostly use Channels myself these days.
I currently use this approach and it works fine
I was wondering if it's possible to have an
IAsyncEnumerable<T>
method onAsyncProducerConsumerQueue<T>
so that I can do this instead.My only qualms with the the
OutputAvailable/Dequeue
approach is that in between the 2 methods, another thread could theoretically empty the queue. Anyway, thank you for this awesome library.The text was updated successfully, but these errors were encountered: