With the TPL Dataflow library, I would like to do something like this:
myActionBlock.Post(newValue, cancelAllPreviousPosts: true);
It appears that the cancellation token on ActionBlock cancels the whole thing; I'd have to make a new ActionBlock if I set that one. Is it possible to do a partial cancellation with ActionBlock?
Posts that have not been processed yet should not be attempted. It would be nice if there was some cancellation token available to check in the currently-executing post.