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