Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

single-producer, single-consumer

A queue with exactly one writer and one reader, which can be made safe without locks.

In a single-producer, single-consumer queue only the producer writes the head index and only the consumer writes the tail. With the right order (store the value, then publish the index) it is safe between an ISR and the main loop without disabling interrupts.

Read the full section →