While working on an answer to this question, I wrote this snippet:
var buffer = new BufferBlock
This is a bug in SourceCore
being used internally by BufferBlock
. Its TryReceiveAll
method doesn't turn on the _enableOffering
boolean data member while TryReceive
does. That results in the task returned from OutputAvailableAsync
never completing.
Here's a minimal reproduce:
var buffer = new BufferBlock
I've just fixed it in the .Net core repository with this pull request. Hopefully the fix finds itself in the nuget package soon.