Without this fix undo operations take up to 5 seconds.
refs #7635
Change-Id: I5e1d5d05d27544f2c30a2d31cf038ce1a8a64e86
try {
long start = System.nanoTime();
mutex.release();
- MainProgram.this.wait(5000);
+ MainProgram.this.wait(5000); // wake up when new operations are scheduled or the last operation is committed
mutex.acquire();
if (!alive)
break main;
LOGGER.error("Trying to commit operation after MainProgram is closed! Operation is " + last);
// return;
}
- if(last != null) last.commit();
+ if(last != null) {
+ last.commit();
+ notifyAll();
+ }
}