Skip to main content

block_on

Function block_on 

Source
pub fn block_on<F>(f: F) -> <F as Future>::Output
where F: Future + Send, <F as Future>::Output: Send,
Expand description

Run f to completion from synchronous code. Inside a multi-threaded runtime the current thread hands its work over while it waits; elsewhere the shared runtime runs it.