BoundedBlockingQueue Java
I am looking for a BoundedBlockingQueue
that can take any other Queue
and make it bounded and blocking.
I found akka.util.BoundedBlockingQueue
which can do that, but the source code has some fixmes in it. So I'm not sure it's clever to u开发者_开发技巧se the code.
At the end I want to have a PriorityQueue bounded and useable for concurrent use.
Are there some other classes that I can use for this task? Maybe in Java 7?
The akka BoundedBlockingQueue seems to be pretty ok for me (Source code). I would really consider using it (at least after writing a good set of unit tests for the class because tests for this class are missing in akka)
The FIXMEs are in pretty strange situations like calling removeAll on the backing queue and it is not empty after that, which is simply a very bad error in the implementation of the backing queue class.
I have not understood what you mean with "the code doesn't let me make the constructor generic".
精彩评论