pub fn run_with_timeout<T, F>(timeout: Duration, f: F) -> Result<T, TimedOut>Expand description
Runs f on a helper thread and waits up to timeout for it to finish.
Use this to bound any blocking call (std::fs::*, image::open, a
subprocess .wait()) that could otherwise block indefinitely against an
unresponsive mount point.