Skip to main content

run_queue

Function run_queue 

Source
pub fn run_queue<W>(
    items: &[PathBuf],
    timeout: Duration,
    worker: W,
) -> Vec<(PathBuf, RegenOutcome)>
where W: Fn(&Path) -> Result<(), String> + Send + Sync + 'static,
Expand description

Run worker over items strictly one at a time, capping each item at timeout. A timed-out item is reported as TimedOut and the queue moves on immediately; its worker thread is left to finish and be dropped (threads cannot be force-killed safely — the leak is bounded by the toolchain call it wraps, and the alternative is a wedged queue).