epox 0.2.5

An epoll driven async executor.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn main() {
    let mut timer = epox::Timer::new().unwrap();
    timer
        .set(epox::timer::Expiration::Interval(
            core::time::Duration::from_millis(100).into(),
        ))
        .unwrap();
    epox::spawn(async move {
        for n in 0..3 {
            println!("waiting for timer {n}");
            assert!(timer.tick().await.unwrap() == 1);
        }
    });
    epox::run().unwrap();
}