open-coroutine-core 0.7.0

The open-coroutine is a simple, efficient and generic coroutine library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::time::{Duration, Instant};

/// just for CI
pub fn init() {
    let _ = std::thread::spawn(|| {
        // exit after 600 seconds, just for CI
        let sleep_time = Duration::from_secs(600);
        let start_time = Instant::now();
        std::thread::sleep(sleep_time);
        let cost = Instant::now().saturating_duration_since(start_time);
        assert!(cost >= sleep_time, "CI time consumption less than expected");
        std::process::exit(-1);
    });
}