1
0
Fork 0
forked from koniifer/ableos
This commit is contained in:
mlokr 2024-07-19 12:34:22 +02:00
parent 6f573602cd
commit dcefe60030

View file

@ -444,11 +444,7 @@ pub fn parse_from_fs(extra_threads: usize, root: &str) -> io::Result<Vec<Ast>> {
seen.lock().unwrap().insert(path.clone(), 0); seen.lock().unwrap().insert(path.clone(), 0);
tasks.push((0, path, None)); tasks.push((0, path, None));
if extra_threads == 0 { std::thread::scope(|s| (0..extra_threads + 1).for_each(|_| _ = s.spawn(thread)));
thread();
} else {
std::thread::scope(|s| (0..extra_threads + 1).for_each(|_| _ = s.spawn(thread)));
}
ast.into_inner().unwrap().into_iter().collect::<io::Result<Vec<_>>>() ast.into_inner().unwrap().into_iter().collect::<io::Result<Vec<_>>>()
} }