Skip to main content

retry_while_busy

Function retry_while_busy 

Source
pub fn retry_while_busy<T>(
    spawn: impl FnMut() -> Result<T, Error>,
) -> Result<T, Error>
Expand description

Run spawn again while the host reports the program busy (ETXTBSY).

For spawns outside this crate’s fork lock: a file another thread has just written can still be open for writing in a child forked before the write finished, until that child execs. A short backoff closes the window.