block

Function block 

Source
pub fn block<T, E, F>(f: F) -> Result<T, E>
where F: Fn() -> Result<T, E>,
Expand description

Poll the given function f until the result returned is not Error::WouldBlock

On std platforms, this will busy-wait with a small sleep (0.5 millis).

On no-std platforms, this will busy-wait.