This commit is contained in:
Cat /dev/Nulo 2023-04-23 21:46:21 -03:00
parent 9f70f973ce
commit 259f68d9c4

View file

@ -23,7 +23,8 @@ fn main() -> Result<(), Box<dyn Error>> {
let input = Path::new("./input");
let paths = iterator(input).collect::<Vec<PathBuf>>();
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) = {