go 0.1.1

A runtime-agnostic Go-style concurrency library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
pub use async_channel::{Sender, Receiver, SendError, RecvError};

pub fn bounded<T>(cap: usize) -> (Sender<T>, Receiver<T>) {
    assert!(cap >= 1, "go::chan::bounded requires cap >= 1");
    async_channel::bounded(cap)
}

pub fn unbounded<T>() -> (Sender<T>, Receiver<T>) {
    async_channel::unbounded()
}