batch-channel 0.4.8

async channel that reduces overhead by reading and writing many values at once
Documentation
1
2
3
4
5
6
7
8
9
10
11
#[test]
fn receiver_implements_iterator() {
    let (tx, rx) = batch_channel::bounded(3);
    let tx = tx.into_sync();
    let rx = rx.into_sync();

    tx.send_iter(['a', 'b', 'c']).unwrap();
    drop(tx);

    assert_eq!(vec!['a', 'b', 'c'], rx.collect::<Vec<_>>());
}