Rust: learning how to share a queue between threads
dbeck.github.io
dbeck.github.io
This is how you share a queue between threads, the title is super-clickbait. It doesn't seem a surprise that stdlib doesn't have a circular buffer, I have no idea what it'd be used for?
Having multiple receivers is slightly more complex, and you can't use std::sync::mpsc (obviously) but they are also possible.