Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run a GNU jobserver shared across all children #383

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

sourcefrog
Copy link
Owner

@sourcefrog sourcefrog commented Jul 15, 2024

Fixes #317

  • Revert to using std::process::Command, since jobserver supports specifically that Revert to using stdlib Command, not subprocess #376
  • Create a jobserver, probably with https://docs.rs/jobserver/
  • Maybe a --jobserver BOOL option to allow turning it off if it causes trouble
  • Maybe --jobserver-slots N to configure the number of slots away from the default of NCPUS
  • Document
  • CI job to test it? - It's on by default and should be covered by the default jobs

This seems hard to test; what we really care about is the maximum number of rustc or similar child processes ever spawned at any moment. In principle we could run ps and parse the output, at least on Unix, but in fact this would be slightly racy because it probably doesn't observe the whole process tree, and so the test might be slightly flaky...

@sourcefrog sourcefrog linked an issue Jul 15, 2024 that may be closed by this pull request
@sourcefrog sourcefrog marked this pull request as ready for review July 30, 2024 17:26
@sourcefrog sourcefrog merged commit 989e402 into main Jul 30, 2024
41 checks passed
@sourcefrog sourcefrog deleted the 317-run-a-jobserver-shared-across-all-children branch July 30, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run a jobserver shared across all children
1 participant