System.Threading.Tasks.Dataflow - TPL - Assist Request - Cannot Find Cause Of Deadlock #107335
-
I'm trying to explore use of the System.Threading.Tasks.Dataflow library with async calls. I found this example helpful when trying to integrate BatchBlock and TransformBlock together Appreciate any help or tips given! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Unless you complete the BatchBlock, |
Beta Was this translation helpful? Give feedback.
Ah, sorry, didn't pay close attention to your source code. I got distracted by your code featuring something like
_batchBlock.Completion.ContinueWith(_ => _getLastDataBlock.Complete());
and then made assumptions based on that without looking at the rest of your code.The issue with your original code is not
batchBlock.Complete()
not being called. You linked each of the blocks withPropagateCompletion = true
, so it would not be necessary to callComplete()
on any block other than_getFirstDataBlock
. (This also means the line_batchBlock.Completion.ContinueWith(_ => _getLastDataBlock.Complete());
is not necessary either).The problem is with your last block in your pipeline being a
Transfor…