Merge pull request #4168 from RalfJung/many-threads
increase thread limit for many-seeds mode
This commit is contained in:
commit
7ad8dba513
1 changed files with 2 additions and 2 deletions
|
@ -723,8 +723,8 @@ fn main() {
|
||||||
|
|
||||||
// Ensure we have parallelism for many-seeds mode.
|
// Ensure we have parallelism for many-seeds mode.
|
||||||
if many_seeds.is_some() && !rustc_args.iter().any(|arg| arg.starts_with("-Zthreads=")) {
|
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.
|
// 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(8);
|
let threads = std::thread::available_parallelism().map_or(1, |n| n.get()).min(10);
|
||||||
rustc_args.push(format!("-Zthreads={threads}"));
|
rustc_args.push(format!("-Zthreads={threads}"));
|
||||||
}
|
}
|
||||||
let many_seeds =
|
let many_seeds =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue