Skip to content

Commit fde1135

Browse files
committed
build-manifest: avoid collecting SHAs in parallel on legacy mode
This avoids overloading the old server, and disrupting the other programs running on it.
1 parent acd8e59 commit fde1135

File tree

1 file changed

+8
-0
lines changed
  • src/tools/build-manifest/src

1 file changed

+8
-0
lines changed

Diff for: src/tools/build-manifest/src/main.rs

+8
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ fn main() {
207207
// related code in this tool and ./x.py dist hash-and-sign can be removed.
208208
let legacy = env::var("BUILD_MANIFEST_LEGACY").is_ok();
209209

210+
// Avoid overloading the old server in legacy mode.
211+
if legacy {
212+
rayon::ThreadPoolBuilder::new()
213+
.num_threads(1)
214+
.build_global()
215+
.expect("failed to initialize Rayon");
216+
}
217+
210218
let mut args = env::args().skip(1);
211219
let input = PathBuf::from(args.next().unwrap());
212220
let output = PathBuf::from(args.next().unwrap());

0 commit comments

Comments
 (0)