Implement semaphore-based AOT compilation throttling#249
Merged
bunjj merged 1 commit intov1.10.2+RAIfrom Aug 4, 2025
Merged
Conversation
kpamnany
commented
Jul 30, 2025
Author
kpamnany
left a comment
There was a problem hiding this comment.
Looks nice and simple, barring a few comments.
de28c00 to
54dec94
Compare
NHDaly
reviewed
Jul 31, 2025
NHDaly
approved these changes
Jul 31, 2025
Member
NHDaly
left a comment
There was a problem hiding this comment.
LGTM! I left a comment about changing the name of the ENV variable to be more verbose.
54dec94 to
0e5b231
Compare
bunjj
approved these changes
Aug 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
The code implements a semaphore-based system to limit concurrent AOT compilation processes using the JC_PAR_PRECOMP_SEM environment variable. It includes proper RAII cleanup, signal-safe waiting, and assumes the semaphore is pre-created by a parent process to control compilation parallelism. This is done to limit the amount of processes that can enter the memory intensive part of the AOT compilation.
Checklist
Requirements for merging:
port-to-*labels that don't apply.