Prioritized TPL DataFlow BufferBlock
Asked Answered
L

1

9

It should be something very natural to have, I was wondering if there is a ready implementation of Prioritized BufferBlock from TPL DataFlow library?

Lingcod answered 17/5, 2011 at 14:4 Comment(5)
How would you expect it to behave with regards to BoundedCapacity? Or is that a feature you don't need?Selfpropelled
@Selfpropelled 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.Reconstructionist
I'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.Lavoie
Everywhere 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?Virge
Related: TPL DataFlow, link blocks with priority?Csc
L
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

Lingcod answered 11/6, 2013 at 9:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.