many-seeds: do not use more than 8 threads
This commit is contained in:
parent
4ce50a3977
commit
d7f165690b
1 changed files with 3 additions and 4 deletions
|
|
@ -723,10 +723,9 @@ fn main() {
|
|||
|
||||
// Ensure we have parallelism for many-seeds mode.
|
||||
if many_seeds.is_some() && !rustc_args.iter().any(|arg| arg.starts_with("-Zthreads=")) {
|
||||
rustc_args.push(format!(
|
||||
"-Zthreads={}",
|
||||
std::thread::available_parallelism().map_or(1, |n| n.get())
|
||||
));
|
||||
// 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);
|
||||
rustc_args.push(format!("-Zthreads={threads}"));
|
||||
}
|
||||
let many_seeds =
|
||||
many_seeds.map(|seeds| ManySeedsConfig { seeds, keep_going: many_seeds_keep_going });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue