rust/hg-core/src/dirstate_tree/status.rs
changeset 49845 e0c0545e2e55
parent 49630 c7fb9b74e753
parent 49772 c52435820bbd
child 49913 c15b415d1bff
--- a/rust/hg-core/src/dirstate_tree/status.rs	Tue Jan 03 11:53:35 2023 -0500
+++ b/rust/hg-core/src/dirstate_tree/status.rs	Wed Jan 04 16:02:22 2023 +0100
@@ -55,7 +55,7 @@
     // 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();