diff --git a/rust/hg-core/src/dirstate_tree/status.rs b/rust/hg-core/src/dirstate_tree/status.rs --- a/rust/hg-core/src/dirstate_tree/status.rs +++ b/rust/hg-core/src/dirstate_tree/status.rs @@ -56,7 +56,7 @@ pub fn status<'dirstate>( // instantiated in `rhg` or some other caller. // TODO find the underlying cause and fix it, then remove this. rayon::ThreadPoolBuilder::new() - .num_threads(16) + .num_threads(16.min(rayon::current_num_threads())) .build_global() .ok();