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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -