-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove spin lock in waitWhileAutoMode. #3356
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3356 +/- ##
============================================
+ Coverage 37.86% 37.98% +0.12%
+ Complexity 17079 17025 -54
============================================
Files 2092 2059 -33
Lines 127596 126029 -1567
Branches 21478 21282 -196
============================================
- Hits 48316 47874 -442
+ Misses 73355 72272 -1083
+ Partials 5925 5883 -42 ☔ View full report in Codecov by Sentry. |
Hi, thanks a lot! In the sibling class "DefaultProofControl" there is a similar busy wait, is it possible to apply your solution there as well? Best regards, |
a58feb5
to
5e1b4f6
Compare
I removed the spin lock also from We have plenty of /cc @FliegendeWurst |
d43552a
to
6d17cc6
Compare
The class is supposed to detect when the GUI thread is blocked. That's not automatically handled by Java. |
This PR removes the spin-lock waiting in
MediatorProofControl
used for waiting on auto-mode finish.It uses the
Condition
class provided by Java5+ concurrent API.Condition
s provide a simple interface for waiting and signaling of threads.We may want to discuss, whether we want one lock in KeYMediator and share it with the threads, or the current solution, the threads have an lock and set the condition in
MediatorProofControl
.It is hard to test, but I didn't observe anything by pressing the start/stop button wildly.