1 2 3 4 5 6 7 8 9 10 11
#[llam::main(profile = "io_latency")] fn main() -> llam::Result<()> { let (tx, rx) = llam::channel::bounded::<u32>(1)?; llam::spawn!(move { tx.send(42).expect("send failed"); }); assert_eq!(rx.recv()?, 42); Ok(()) }