-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix bad precompile statements via an output lock #44252
Fix bad precompile statements via an output lock #44252
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.
Probably worth only locking if threading is possible
@KristofferC this is fixed in base build by only using one thread during precompile statement generation, but I think this is still needed for PackageCompiler as the user may be trying to sysimage multithreaded code that can't be run single threaded. Does that sound right? |
That seems like it could indeed happen. Fixing it here seems like a better way than just doing it for the Base precompile script. |
Ok I'll merge. This seems pretty safe and the nthreads checks mean there should be no slowdown on julia build. |
(cherry picked from commit c5bc69c)
This needs a manual backport against |
It seems like multithreading might cause statements to be outputted at the same time, so a file lock is needed?
Fixes the latest reports in #28808 but shouldn't close that issue as the core issue there appears to be a different bug.