pub fn create_basic_runtime() -> tokio::runtime::Runtime {
tokio::runtime::Builder::new_current_thread()
.enable_io()
.enable_time()
.max_blocking_threads(32)
.build()
.unwrap()
}
pub fn run_basic<F, R>(future: F) -> R
where
F: std::future::Future<Output = R>,
{
let rt = create_basic_runtime();
let local = tokio::task::LocalSet::new();
local.block_on(&rt, future)
}