channels.md (706B)
1 # Channels 2 3 Channels: A [communication primitive](/async_programming/concurrency_primitives.md) 4 used in many languages (Rust, Go, .NET, etc.) to pass messages between 5 concurrent pieces of code (goroutines, tasks, threads). 6 7 # Tokio's channel primitives 8 9 - mpsc: multi-producer, single-consumer channel. Many values can be sent. 10 11 - oneshot: single-producer, single consumer channel. A single value can be sent. 12 13 - broadcast: multi-producer, multi-consumer. Many values can be sent. Each 14 receiver sees every value. 15 16 - watch: multi-producer, multi-consumer. Many values can be sent, but no history 17 is kept. Receivers only see the most recent value. 18 19 [tokio-tutorial](/exercises/tokio-tutorial/index.md)