You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within ThreadMonitor.run, there's code of the form:
synchronized (monitor) {
long waitTime = getCheckInterval(runtime);
if (waitTime == 0) {
waitTime = 1;
}
monitor.wait(waitTime);
}
The problem here is that if the JS evaluation has completed just prior to entering the synchronized block, the monitor thread won't notice and enter its extended wait. Placing a check for stop within the synchronized block allows the monitor thread to notice the JS evaluation is already complete, avoiding the unecessary wait.
synchronized (monitor) {
if (stop.get())
{
return;
}
long waitTime = getCheckInterval(runtime);
if (waitTime == 0) {
waitTime = 1;
}
monitor.wait(waitTime);
}
The text was updated successfully, but these errors were encountered:
Within ThreadMonitor.run, there's code of the form:
The problem here is that if the JS evaluation has completed just prior to entering the synchronized block, the monitor thread won't notice and enter its extended wait. Placing a check for stop within the synchronized block allows the monitor thread to notice the JS evaluation is already complete, avoiding the unecessary wait.
The text was updated successfully, but these errors were encountered: