[−][src]Function bastion::executor::blocking
pub fn blocking<F, R>(future: F) -> RecoverableHandle<R> where
F: Future<Output = R> + Send + 'static,
R: Send + 'static,
Spawns a blocking task, which will run on the blocking thread pool, and returns the handle.
Example
use bastion::executor::blocking; let task = blocking(async move { thread::sleep(time::Duration::from_millis(3000)); });