EditorMouseHoverPopupManager: prevent races (IDEA-CR-56548)

GitOrigin-RevId: 5dbea4e04b3f995199a43061a975d9e362829c89
This commit is contained in:
Peter Gromov
2019-12-18 20:36:40 +00:00
committed by intellij-monorepo-bot
parent 3b8ed7796d
commit 19dde982dc
@@ -221,7 +221,11 @@ public final class EditorMouseHoverPopupManager implements Disposable {
.submit(AppExecutorUtil.getAppExecutorService());
myCurrentProgress = promise;
promise.onProcessed(__ -> UIUtil.invokeLaterIfNeeded(() -> myCurrentProgress = null));
promise.onProcessed(__ -> UIUtil.invokeLaterIfNeeded(() -> {
if (myCurrentProgress == promise) {
myCurrentProgress = null;
}
}));
}, context.getShowingDelay());
}