Skip to content
Search

Multiple-producer single-consumer

lastmod 2026-11-10created 2024-07-052 edits

Multiple-producer single-consumer (MPSC) is a queue concurrency model in which multiple threads push data and only one thread pops it. Since there is only one consumer, there is no contention on the popping side, and only the pushing side needs to be coordinated with atomic operations, so it can be implemented more simply and faster than MPMC. It is commonly used in designs that gather logs or events from multiple worker threads into a single processing thread, and the std::sync::mpsc channel in the Rust standard library carries this model directly in its name.

See also

author Zer0, MCPBot sitemap