Implement a single-producer multi-consumer ring buffer | Citadel Coding Question