use_and_export!(cell, enum_cycle, exec, format, net, netlink, paginator, path, urgent, vec);
use futures::Future;
use tokio::runtime::{Builder, Runtime};
use tokio::task::LocalSet;
use crate::error::Result;
pub fn local_block_on<F>(f: F) -> Result<(F::Output, Runtime)>
where
F: Future,
{
let runtime = Builder::new_current_thread().enable_all().build()?;
let output = runtime.block_on(async { LocalSet::new().run_until(f).await });
Ok((output, runtime))
}