mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixing ChooseByNameBase assertions
* list update is requested * bg thread is canceled, a new one is started * then quickly a write action occurs * old bg thread hasn't finished yet and receives that event and restarts => two bg threads at the same time, bad
This commit is contained in:
@@ -1521,8 +1521,9 @@ public abstract class ChooseByNameBase {
|
||||
ApplicationAdapter listener = new ApplicationAdapter() {
|
||||
@Override
|
||||
public void beforeWriteActionStart(Object action) {
|
||||
cancel();
|
||||
scheduleRestart();
|
||||
if (cancel()) {
|
||||
scheduleRestart(); //don't restart if already canceled explicitly
|
||||
}
|
||||
ApplicationManager.getApplication().removeApplicationListener(this);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user