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: Only run one save action compile at a time #311

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Feb 11, 2025

No description provided.

@MarcinVaadin
Copy link
Member

@Artur-
Copy link
Member Author

Artur- commented Feb 12, 2025

I am not sure how that Semaphore works as it seems like both waitFor() and down() need to be called but that would mean there is a race condition.. Do we need an IntelliJ specific Semaphore instead of the standard Java one?

@Artur- Artur- marked this pull request as ready for review February 12, 2025 09:04
@MarcinVaadin
Copy link
Member

Ok, I understand the change, one thing - if compileAndReload somehow fails and do not publish finished event we will have lock never released?

@Artur-
Copy link
Member Author

Artur- commented Feb 12, 2025

Yes, then no further compiles will take place and that is why it uses an executor service so that if this would happen, then IntelliJ won't freeze completely but only the started thread. At some point it will run out of threads though.

Maybe we should have a timeout

@Artur-
Copy link
Member Author

Artur- commented Feb 12, 2025

Now it hopefully waits up to 30s, gives up and proceeds

Copy link

Artifact build on last commit: distributions.zip.
For MacOS users: there is a zip inside this zip and Finder unzips them both at once. Use unzip distributions.zip from Terminal or check solution for Archive Manager.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@MarcinVaadin MarcinVaadin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's go with that one

@MarcinVaadin MarcinVaadin merged commit d64b6eb into main Feb 12, 2025
10 checks passed
@MarcinVaadin MarcinVaadin deleted the one-save-compile-at-a-time branch February 12, 2025 09:51
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