Crate bufchan

source ·
Expand description

A high throughput and simple buffered MPSC channel.

Take at look at the README for benchmarks and caveats.

Example

let (mut tx, rx) = bufchan::unbounded();

std::thread::spawn(move || {
    (1..=10).for_each(|x| tx.send(x));
});

assert_eq!(
    rx.into_iter().collect::<Vec<_>>(),
    vec![1,2,3,4,5,6,7,8,9,10]
);

Structs

  • The receiving end of the channel.
  • The sending side of the channel.

Functions