Skip to content

DataflowLinkOptions.PropagateCompletion not working as expected #91725

Answered by svick
rambodghx asked this question in General
Discussion options

You must be logged in to vote

PropagateCompletion works the other way around: you complete ac and then wait for ac2 to complete:

var ac = new TransformBlock<int, int>(i => i * 2);
var ac2 = new ActionBlock<int>(i => { });
ac.LinkTo(ac2, new DataflowLinkOptions { PropagateCompletion = true });
ac.Post(10);
ac.Post(12);
ac.Complete();
await ac2.Completion;

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rambodghx
Comment options

@svick
Comment options

Answer selected by rambodghx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants