Skip to content

Commit 8c3d79d

Browse files
pietroalbiniMark-Simulacrum
authored andcommitted
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 cfc8d81 commit 8c3d79d

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

src/tools/build-manifest/src/main.rs

Lines changed: 8 additions & 0 deletions
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)