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

fix: Handle race conditions when getting the compiler bridge #759

Merged

Conversation

acote-coveo
Copy link
Contributor

It was identified in #738 that a race condition could occur when building a project using multiple threads.

To mitigate the issue, I wrapped the installation of the compiler with a synchronized block on the Static instance.

As a result, if multiple threads try to install the compiler at the same time, only one thread will be able to do so. When they will get unlocked, it will check if the file was created meanwhile and if so, to will early return.

It was identified in davidB#738 that a race condition could occur when building a project using multiple threads.

To mitigate the issue, I wrapped the installation of the compiler with a synchronized block on the Static instance.

As a result, if multiple threads try to install the compiler at the same time, only one thread will be able to do so. When they will get unlocked, it will check if the file was created meanwhile and if so, to will early return.
@slandelle slandelle merged commit 75e2044 into davidB:master Apr 23, 2024
1 check passed
@acote-coveo
Copy link
Contributor Author

@slandelle When can we expect a release? I also noticed that the latest versions are not available on maven central

@slandelle
Copy link
Collaborator

As soon as I manage to fix the release. I suspect maven-gpg-plugin has changed the way things work...

@slandelle
Copy link
Collaborator

4.9.0 is online

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.

2 participants