It should be something very natural to have, I was wondering if there is a ready implementation of Prioritized BufferBlock from TPL DataFlow library?
Asked
Active
Viewed 1,565 times
9
-
How would you expect it to behave with regards to `BoundedCapacity`? Or is that a feature you don't need? – svick Jun 03 '12 at 10:37
-
@svick I'd expect that if `BoundedCapacity` was reached, then it would drop the item at the end of the list. Not exactly optimal, but it's one approach. Another would be to always set `BoundedCapacity` to `DataflowBlockOptions` to `Unbounded`. – casperOne Nov 16 '12 at 21:16
-
1I'd be cautious about such a block. All existing dataflow blocks have a guarantee that message ordering is preserved. This would violate that apparent guarantee. – Andrew Arnott Dec 31 '12 at 17:28
-
1Everywhere I look, no one seem to realise the valid need for a priority queue. And I cannot understand way. In low level IO operations (and even in high level IO operations) prioritised queuing is very essential. @husayt, have you had any luck with a solution to your problem yet? – Francois Nel Jun 11 '13 at 07:40
-
Related: [TPL DataFlow, link blocks with priority?](https://stackoverflow.com/questions/20974228/tpl-dataflow-link-blocks-with-priority) – Theodor Zoulias Jan 31 '23 at 10:55
1 Answers
0
Seems the best way to achieve this is to use a specialised Task Scheduler, rather than implementing your own BufferBlock. There are many variety of them one can find out in net. For instance, check QueuedTaskScheduler
in ParallelExtensions Library

husayt
- 14,553
- 8
- 53
- 81