Jun 25, 2026
•
38 min read
The Same Producer-Consumer Buffer In Three Runtimes, And What The Comparison Reveals
The same shared-state problem — many producers, one consumer, a buffer between them — appears in three of the codebases I have worked on this year. Each of them solves it differently. The primitive each one uses would be wrong for the other two contexts in ways that reveal what concurrency primitives are actually for: not a menu you choose from, but primarily a function of two things: the runtime's sleep model, and which side of the buffer fans out. A walk through one problem, three runtimes, the reasoning behind each, and the inverse case where the consumer fans out instead of the producer.
concurrency
freertos
python
go
isr
runtime
systems