void () { List<Runnable> copy; synchronized (myLock) { if (!myRequestSubmitted) return; myRequestSubmitted = false; LOG.assertTrue(!myRequestRunning); if (myStopped) { debug("Stopped", this); return; } copy = new ArrayList<>(myWaitingUpdateCompletionQueue); myWaitingUpdateCompletionQueue.clear(); } debug("Before callback", this); boolean nothingToUpdate = false; try { nothingToUpdate = myFastTrackDelegate.getAsBoolean(); // CLM.hasNothingToUpdate } catch (ProcessCanceledException ignore) { } catch (Throwable e) { LOG.error(e); } debug("After callback", this); if (nothingToUpdate) { runWaiters(copy); debug("Runnables executed", this); } else { // Need to do a fair refresh, will fire events later debug("Restoring runnables", this); synchronized (myLock) { myRequestSubmitted = true; // no need to schedule runnable - it's already pending myWaitingUpdateCompletionQueue.addAll(0, copy); } } }