mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make AppUIExecutorImpl#later thread-safer
This commit is contained in:
+3
-2
@@ -57,11 +57,12 @@ class AppUIExecutorImpl implements AppUIExecutor {
|
||||
@NotNull
|
||||
@Override
|
||||
public AppUIExecutor later() {
|
||||
int eventCount = IdeEventQueue.getInstance().getEventCount();
|
||||
Integer edtEventCount = ApplicationManager.getApplication().isDispatchThread() ? IdeEventQueue.getInstance().getEventCount() : null;
|
||||
return withConstraint(new ConstrainedExecutor() {
|
||||
@Override
|
||||
public boolean isCorrectContext() {
|
||||
return eventCount != IdeEventQueue.getInstance().getEventCount();
|
||||
return edtEventCount == null ? ApplicationManager.getApplication().isDispatchThread()
|
||||
: edtEventCount != IdeEventQueue.getInstance().getEventCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user