async-global-executor 3.1.0

A global executor built on top of async-executor and async-io
Documentation
1
2
3
4
5
6
7
8
9
pub(crate) fn block_on<F: std::future::Future<Output = T>, T>(future: F) -> T {
    #[cfg(feature = "async-io")]
    let run = || async_io::block_on(future);
    #[cfg(not(feature = "async-io"))]
    let run = || futures_lite::future::block_on(future);
    #[cfg(feature = "tokio")]
    let _tokio_enter = crate::tokio::enter();
    run()
}