diff --git a/src/breeze.rs b/src/breeze.rs index bd5c268..01423dc 100644 --- a/src/breeze.rs +++ b/src/breeze.rs @@ -29,11 +29,12 @@ fn parse_file(filepath: &std::path::PathBuf, parser: &mut Parser) -> Result, language: Language, + num_jobs: Option, callback: &'static (dyn Fn(Tree) + Send + Sync), ) { let threadpool = Builder::new() .thread_name("neorg".into()) - .num_threads(8) + .num_threads(num_jobs.unwrap_or(4)) .build(); for file in files { @@ -75,6 +76,7 @@ mod tests { parse_files( workspace.files(), tree_sitter_norg::language(), + None, &|tree: Tree| assert!(tree.root_node().kind() == "document"), ); }