Skip to main content

with_progress

Function with_progress 

Source
pub fn with_progress<T>(
    progress: &Arc<Progress>,
    job: impl FnOnce() -> T,
) -> Result<T, Cancelled>
Expand description

Runs job as the job progress describes: every batch of runs it starts (on_all_cores) is counted in progress and stops once progress.cancel is set, which ends job with Err(Cancelled). A panic of job stays a panic.