rasi-ext 0.1.11

This library includes extend features or experimental features that are useful for asynchronous programming.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::sync::Once;

use rasi_default::{
    executor::register_futures_executor, net::register_mio_network, time::register_mio_timer,
};

#[allow(unused)]
pub(crate) fn init() {
    static INIT: Once = Once::new();

    INIT.call_once(|| {
        #[cfg(windows)]
        rasi_default::fs::register_mio_named_pipe();
        register_mio_network();
        register_mio_timer();
        register_futures_executor().unwrap();
    })
}