1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cfg_if::cfg_if! {
if #[cfg(feature = "thread-pool-runtime")] {
mod thread_pool;
pub use thread_pool::{ThreadPoolAsyncManager as AsyncManager, spawn, spawn_with_handle, block_on};
} else if #[cfg(feature = "dummy-runtime")] {
mod dummy;
pub use dummy::{DummyAsyncManager as AsyncManager, spawn, spawn_with_handle, block_on};
} else if #[cfg(feature = "async-std-runtime")] {
mod async_std;
pub use self::async_std::{AsyncStdAsyncManager as AsyncManager, spawn, spawn_with_handle, block_on};
}
else {
std::compile_error!("Please choose a runtime feature: thread-pool-runtime, async-std-runtime, wasm_bindgen_runtime, dummy-runtime");
}
}