Skip to main content

block_until

Function block_until 

Source
pub fn block_until<F>(
    timeout: Duration,
    f: F,
) -> Result<<F as Future>::Output, F>
where F: Future + Unpin,
Expand description

Blocks the current waiting for f to be completed or for the timeout to expire

If the timeout expires first, then f is returned so it can be retried if desired.