[−][src]Function bastion_executor::run::run
pub fn run<F, T>(future: F, stack: ProcStack) -> T where
F: Future<Output = T>,
This method blocks the current thread until passed future is resolved with an output (including the panic).
It is called block_on
or blocking
in some executors.
Example
use bastion_executor::prelude::*; use lightproc::prelude::*; let mut sum = 0; run( async { (0..10_000_000).for_each(|_| { sum += 1; }); }, ProcStack::default(), );