C++ Advanced · exercise 03
Lock-free data structures
Complete a single-producer single-consumer ring buffer.
C++ Advanced lesson 03Guided steps
- 1.push stores a value and advances the head; it fails when the ring is full.
- 2.pop reads from the tail and fails when head equals tail.
- 3.Print each popped value, then the empty result.
Your code
Your code is saved in this browser after every run and restored next time.