Вопрос

Is there a standard fast Java queue/circular-buffer structure like ArrayBlockingQueue, backed by an array, but without any concurrency synchronisation overhead?

Это было полезно?

Решение

Yes, there is, and it's called ArrayDeque

Другие советы

If you need fixed-size queue / ring-buffer without synchronization it seems you would need to write it yourself.
You could also use some alternative options such as apache commons CircularFifoBuffer.
Please see more details here.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top