Skip to main content

hash_files_parallel

Function hash_files_parallel 

Source
pub fn hash_files_parallel(
    paths: &[&Path],
    algo: HashAlgorithm,
) -> Vec<Result<String>> 
Expand description

Batch-hash multiple files with SHA-256/MD5 using std::thread::scope. Uses lightweight OS threads instead of rayon’s work-stealing pool. For single-invocation tools, this saves ~300µs of rayon thread pool initialization (spawning N-1 threads + setting up work-stealing deques). Returns results in input order.