From 259f68d9c4dfc98d2a07d2185dbb0f93e74c8d9d Mon Sep 17 00:00:00 2001 From: Nulo Date: Sun, 23 Apr 2023 21:46:21 -0300 Subject: [PATCH] x --- rust/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) = {