I know the following works:
var forwarder = new BufferBlock<SomeType>();
forwarder.LinkTo(target1, item => matchesTarget1(item));
forwarder.LinkTo(target2, item => matchesTarget2(item));
forwarder.LinkTo(DataflowBlock.NullTarget<SomeType>());
The problem is I will be linking and unlinking items continuously at runtime. Will dataflow choose from most specific to least specific or will it go in the order things were linked in when trying to offer messages? I would like to make sure my NullTarget only swallows the message if nothing else can take it at the time, given predicate linking and unlinking will be happening continuously.
Aucun commentaire:
Enregistrer un commentaire