rust-impl-channels

Installation
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

rust-impl-channels

A channel is a typed queue with a sender half and a receiver half: producers push values into the sender, consumers pull them from the receiver, and the queue handles synchronization. The right channel depends on three axes: sync vs async, how many producers and consumers, and how many values flow through it over time. Pick the wrong one and the program either blocks the executor, runs out of memory, or silently drops messages.

Cross-references: [[rust-impl-async-tokio]] (the runtime that hosts async channels and task spawning), [[rust-impl-concurrency]] (Arc / Mutex / atomics for in-place shared state without a channel), [[rust-core-stdlib-overview]] (std::sync::mpsc lives in the stdlib sync module), [[rust-errors-async]] (.await discipline, what a SendError means in an async context).


When to use this skill

  • User picks between std::sync::mpsc and tokio::sync::mpsc in async code.
  • User asks "why does my Tokio task hang" when blocking on a std::sync::mpsc::Receiver::recv().
  • User has one task that needs to send a single value to another task and is reaching for mpsc.
  • User wants to fan one event out to many subscribers.
  • User wants to share the "latest configuration" or "latest state" with many watchers, not a stream.
  • User asks "bounded or unbounded channel".
  • User asks "what is backpressure" or "how do I apply backpressure".
  • User asks "what does SendError mean" or "the receiver is dropped".
  • User asks "do I need crossbeam-channel or flume instead of stdlib / tokio".
Installs
2
GitHub Stars
1
First Seen
May 24, 2026