Skip to content

Commit

Permalink
build-manifest: avoid collecting SHAs in parallel on legacy mode
Browse files Browse the repository at this point in the history
This avoids overloading the old server, and disrupting the other
programs running on it.
  • Loading branch information
pietroalbini committed Oct 1, 2020
1 parent acd8e59 commit fde1135
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ fn main() {
// related code in this tool and ./x.py dist hash-and-sign can be removed.
let legacy = env::var("BUILD_MANIFEST_LEGACY").is_ok();

// Avoid overloading the old server in legacy mode.
if legacy {
rayon::ThreadPoolBuilder::new()
.num_threads(1)
.build_global()
.expect("failed to initialize Rayon");
}

let mut args = env::args().skip(1);
let input = PathBuf::from(args.next().unwrap());
let output = PathBuf::from(args.next().unwrap());
Expand Down

0 comments on commit fde1135

Please sign in to comment.