I've built a similar lock-free ring buffer in C++11 https://github.com/posterior/loom/blob/master/doc/adapting.m...
Here is one in Ruby: https://github.com/ileitch/disruptor
Both languages are quite readable and I've used these to teach the concepts to beginners.
I've built a similar lock-free ring buffer in C++11 https://github.com/posterior/loom/blob/master/doc/adapting.m...