I need to build a blocking priority queue and my hunch is that TakeFromAny
may be the secret ingredient, however the documentation on that method is sparse. What is its purpose / appropriate use?
My requirement is that multiple threads will add to either a high priority or low priority queue. One thread will consume these two queues always taking from the high priority queue before the low priority queue.
It's quite possible that the neither the BlockingCollection
or the TakeFromAny
method will be of any use to me. If so, then a pointer in the right direction would be appreciated.