compio-runtime 0.12.0-rc.2

High-level runtime for compio
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::time::Duration;

use compio_runtime::time::sleep;

#[test]
#[should_panic]
fn panic_spawn() {
    compio_runtime::Runtime::new().unwrap().block_on(async {
        let _handle = compio_runtime::spawn(async {
            sleep(Duration::from_millis(100)).await;
            panic!("test panic in spawn");
        });
        sleep(Duration::from_millis(100)).await;
        panic!("another panic");
    })
}