Function fixture::utils::run_with_status_check
source · pub fn run_with_status_check<F, U, C>(
closure: F,
interval: Duration,
continue_fn: C
) -> Result<U>
Expand description
Run the provided closure in a separate thread and return it’s result. If the closure does not finish, continue_fn is called periodically with interval while continue_fn return true. Once continue_fn return false, an Error is returned instead.
WARNING: It is not possible to kill the closure if a timeout occurs. It is advised to panic when an error is returned.