Skip to content

Commit

Permalink
fix IllegalMonitorException
Browse files Browse the repository at this point in the history
  • Loading branch information
wadoon committed Jan 4, 2024
1 parent c913759 commit f7ed29f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ private class AutoModeWorker extends SwingWorker<ApplyStrategyInfo, Object> {
private final ImmutableList<Goal> goals;
private final ApplyStrategy applyStrategy;
private ApplyStrategyInfo info;
private final ReentrantLock lock;
private final Condition ready;

public AutoModeWorker(final Proof proof, final ImmutableList<Goal> goals,
Expand All @@ -189,7 +190,8 @@ public AutoModeWorker(final Proof proof, final ImmutableList<Goal> goals,
applyStrategy.addProverTaskObserver(ui.getMediator().getAutoSaver());
}

ready = new ReentrantLock().newCondition();
lock = new ReentrantLock();
ready = lock.newCondition();
}

@Override
Expand All @@ -209,7 +211,11 @@ protected void done() {
applyStrategy.clear();
}
ui.getMediator().finishAutoMode(proof, true, true, null);

lock.lock();
ready.signalAll();
lock.unlock();

emitInteractiveAutoMode(initialGoals, proof, info);

if (info.getException() != null) {
Expand Down

0 comments on commit f7ed29f

Please sign in to comment.