Skip to main content

step_if_slow

Function step_if_slow 

Source
pub fn step_if_slow<T: StepOutcome>(
    id: &'static str,
    label: &str,
    f: impl FnOnce() -> T,
) -> T
Expand description

A step that is usually instant and only sometimes waits (another process’s migration lock): its begin line is written once it has run for SLOW_STEP, while it is still running, and then its end line with the outcome. A fast one writes nothing.