There is a multi-threaded environment and multiple threads enqueue and dequeue a priority queue. In case when one or more of the threads add only high priority queue items, there is a possibility that, items with lower priority will never exit the queue. I was wondering if there is any technique to avoid this.
I would appreciate any help. Thanks in advance.