forked from AbleOS/holey-bytes
b
This commit is contained in:
parent
aeb3a37f7d
commit
9a8a56fe97
|
@ -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);
|
||||
tasks.push((0, path, None));
|
||||
|
||||
if extra_threads == 0 {
|
||||
thread();
|
||||
} else {
|
||||
std::thread::scope(|s| (0..extra_threads + 1).for_each(|_| _ = s.spawn(thread)));
|
||||
}
|
||||
std::thread::scope(|s| (0..extra_threads + 1).for_each(|_| _ = s.spawn(thread)));
|
||||
|
||||
ast.into_inner().unwrap().into_iter().collect::<io::Result<Vec<_>>>()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue