use futures_lite::{StreamExt, future};
fn main() {
let (tx, rx) = async_observe::channel(0);
let producer: _ = async move {
for n in 1..10 {
future::yield_now().await;
_ = tx.send(n);
}
};
let consumer = rx.into_stream().for_each(|n| println!("{n}"));
future::block_on(future::zip(producer, consumer));
}