Rethink Robotics interview question

Implement a ring buffer with a certain read/write pattern. Then implement the changes required to make it multi-threaded.