Skip to main content

block_on_shared

Function block_on_shared 

Source
pub fn block_on_shared<F, T>(future: F) -> Result<T>
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Block on a future using the shared runtime

This is safe to call from synchronous contexts as it properly handles nested runtime calls by using the handle instead of entering the runtime.