1 2 3 4 5 6 7 8 9 10 11 12
#![feature(async_await)] use runtime_tokio::Tokio; #[runtime::test(Tokio)] async fn spawn() { let handle = runtime::spawn(async { println!("hello planet from Tokio"); 42 }); assert_eq!(handle.await, 42); }