문제

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