-
Notifications
You must be signed in to change notification settings - Fork 0
Implement semaphore-based AOT compilation throttling #249
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice and simple, barring a few comments.
de28c00
to
54dec94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Clean and compact patch. I can't approve because I opened the PR, but you can approve and merge this @bunjj. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left a comment about changing the name of the ENV variable to be more verbose.
54dec94
to
0e5b231
Compare
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.