[go: up one dir, main page]

runtime 0.3.0-alpha.4

Empowering everyone to build asynchronous software.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(async_await)]

use runtime_native::Native;

#[runtime::test(Native)]
async fn spawn() {
    let handle = runtime::spawn(async {
        println!("hello planet from Native");
        42
    });
    assert_eq!(handle.await, 42);
}