flume 0.11.0

A blazingly fast multi-producer channel
Documentation
#[cfg(feature = "async")]
#[async_std::main]
async fn main() {
    let (tx, rx) = flume::bounded(1);

    let t = async_std::task::spawn(async move {
        while let Ok(msg) = rx.recv_async().await {
            println!("Received: {}", msg);
        }
    });

    tx.send_async("Hello, world!").await.unwrap();
    tx.send_async("How are you today?").await.unwrap();

    drop(tx);

    t.await;
}

#[cfg(not(feature = "async"))]
fn main() {}