pub fn blocking<F, R>(future: F) -> RecoverableHandle<R> ⓘExpand description
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));
});