vigna / fastutil

fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues.
Apache License 2.0
1.74k stars 194 forks source link

Introduced `FixedArrayFIFOQueue` #296

Open catap opened 1 year ago

catap commented 1 year ago

This is a copy of ArrayFIFOQueue which has fixed capacity.

I've also refactor a bit PriorityQueue interface to introduce a clear way to use exception free queue.

catap commented 1 year ago

@vigna I've heavy rework this PR to use ArrayFIFOQueue as a base version. I've removed all councurency things which was originally here because it is too complex and probably useless. Synchronization for few operation is near of nothing, and better to suggest users to make simpler solution when they need it.