Skip to content

System.Threading.Tasks.Dataflow - TPL - Assist Request - Cannot Find Cause Of Deadlock #107335

Answered by elgonzo
Sn3akyP3t3 asked this question in Q&A
Discussion options

You must be logged in to vote

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 with PropagateCompletion = true, so it would not be necessary to call Complete() 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…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Sn3akyP3t3
Comment options

@elgonzo
Comment options

@elgonzo
Comment options

Answer selected by Sn3akyP3t3
@Sn3akyP3t3
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants