Skip to main content

block_on

Function block_on 

Source
pub fn block_on<F>(fut: F) -> <F as IntoFuture>::Output
where F: IntoFuture,
Expand description

Block the thread until the future is ready.

ยงExample

let my_fut = async {};
let result = pollster::block_on(my_fut);