[−][src]Function async_global_executor::run
pub fn run<F: Future<Output = T> + 'static, T: 'static>(future: F) -> T
Runs the global and the local executor on the current thread
Note: this calls async_io::block_on
underneath.
Examples
let task = async_global_executor::spawn(async { 1 + 2 }); async_global_executor::run(async { assert_eq!(task.await, 3); });