Function block_for_future

Source
pub fn block_for_future<T: Send>(
    future: impl Future<Output = T> + Send + 'static,
) -> T
Expand description

Blocking waits for a future to complete. This blocks the current thread potentially staling other concurrent futures (but not other concurrent tasks). Try to avoid this method infavor of awaiting the future instead.