diff --git a/rust/src/main.rs b/rust/src/main.rs index 2ebfff0..c2ac9ad 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -23,7 +23,8 @@ fn main() -> Result<(), Box> { let input = Path::new("./input"); let paths = iterator(input).collect::>(); - let chunks = paths.chunks(paths.len() / 4 + paths.len() % 4); + let n_threads = 4; + let chunks = paths.chunks(paths.len() / n_threads + paths.len() % n_threads); println!("threads: {}", chunks.len()); let (rx, threads) = {