Two concurrent workers take turns printing 'ping' and 'pong' — 10 times each, strictly alternating, never out of order, without busy-waiting or sleep tricks. Pick any language from the tabs (Go, Python, Rust, or Node.js) and ship a runnable file plus a README explaining how the ordering is enforced.
threading.Event pairs (one for each side) work cleanly — wait-then-signal-the-other.mpsc::channels or a tokio::sync::Notify pair do the job without an unsafe block.async generator or a promise-chained baton pattern avoids spawning actual threads.sleep(ms) anywhere, the grader will fail you on 1-in-100 races. Use proper wakeups.ping
pong
ping
pong
ping
pong
ping
pong
ping
pong
ping
pong
ping
pong
ping
pong
ping
pong
ping
pong
10 in, get 2N lines). Prove it still alternates for N=10,000.