1
Fork 0

Merge pull request #4168 from RalfJung/many-threads

increase thread limit for many-seeds mode
This commit is contained in:
Ralf Jung 2025-01-31 10:49:53 +00:00 committed by GitHub
commit 7ad8dba513
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -723,8 +723,8 @@ fn main() {
// Ensure we have parallelism for many-seeds mode.
if many_seeds.is_some() && !rustc_args.iter().any(|arg| arg.starts_with("-Zthreads=")) {
// Clamp to 8 threads; things get a lot less efficient beyond that due to lock contention.
let threads = std::thread::available_parallelism().map_or(1, |n| n.get()).min(8);
// Clamp to 10 threads; things get a lot less efficient beyond that due to lock contention.
let threads = std::thread::available_parallelism().map_or(1, |n| n.get()).min(10);
rustc_args.push(format!("-Zthreads={threads}"));
}
let many_seeds =