Self-resizing ArrayBlockingQueue

We all know, that linked lists are bad for rapid add / remove… And that’s the case for me…

I have an input queue and I want it to be thread-safe, but also array-based. ArrayBlockingQueue throws errors, if I encounter the maximal capacity of the queue :frowning:

Is there a good queue implementation out there? Probably hanging in java.util.concurrent or somewhere in the internet?

I’ve tested ArrayBlockingQueue and the GapList (from the brownies collection). The ArrayBlockingQueue does not resize itself when it’s capacity is reached, it just throws an error, and the GapList is not thread-safe…

Just use LinkedBlockingQueue.

Hmm… yes… this was plan B, and I guess it’s the best solution :slight_smile: