Bounded PriorityBlockingQueue

后端 未结 9 1160
Happy的楠姐
Happy的楠姐 2021-01-01 17:47

PriorityBlockingQueue is unbounded, but I need to bound it somehow. What is the best way to achieve that?

For information, the bounded PriorityBlo

9条回答
  •  被撕碎了的回忆
    2021-01-01 18:22

    Have a look at the ForwardingQueue from the Google Collections API. For blocking semantics you could use a Semaphore.

提交回复
热议问题