Skip to main content

create_progress_bar

Function create_progress_bar 

Source
pub fn create_progress_bar(msg: &'static str, total: u64) -> ProgressBar
Expand description

A determinate progress bar for a pass whose total is known up front.

A spinner says only “still going”. Sizing eighty repositories takes long enough that the difference matters: 41/80 and a bar that visibly moves is the difference between waiting and reaching for Ctrl-C. Use it wherever the count is known before the work starts, and create_spinner only where it genuinely is not.

Safe to advance from several threads at once — indicatif synchronises internally, which is what lets the parallel status scan report from every worker.