c# - TPL Dataflow block never completes on PropagateCompletion -


since last alteration propagated-completion pipeline, 1 of buffer blocks never completes. let me summarize working , isn't anymore:

previously working:

a.linkto(b, propagatecompletion); b.linkto(c, propagatecompletion); c.linkto(d, propagatecompletion); d.receive();  // completes 

no longer working:

a.linkto(b, propagatecompletion); c.linkto(d, propagatecompletion);  await a.completion; somewriteonceblock.post(b.count); // b.complete(); commented on purpose b.linkto(c, propagatecompletion);  d.receive();  // reaches completion // b remains in 'waiting activation' // c executes never completes since b doesn't either 

if uncomment commented line, works, line should not necessary.

somehow bufferblock b never reaches completion, though block linked to completed , propagates completion, , block linked from receives buffered items.

by awaiting completion of none of remaining code executed until completes. that's how await works - code after wrapped in continuation ready completion of awaited code. in scenario b linked after completes completion not propagated think.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -