Jun
24
Dissecting the Disruptor: What's so special about a ring buffer?
The difference between the ring buffer as we’ve implemented it, and the queues we had traditionally been using, is that we don’t consume the items in the buffer - they stay there until they get over-written. Which is why we don’t need the “end” pointer you see in the Wikipedia version. Deciding whether it’s OK to wrap or not is managed outside of the data structure itself (this is part of the producer and consumer behaviour - if you can’t wait for me to get round to blogging about it, check out the Disruptor site).