vcs: do not fire Topic events while holding lock

Even if listeners themselves are harmless, `MessageBusImpl.pumpMessages`
can pump another event from another topic synchronously, causing a deadlock.

GitOrigin-RevId: c98cf2e511f36f64ce3073993d4b06b3c68045c0
This commit is contained in:
Aleksey Pivovarov
2019-04-28 16:01:28 +03:00
committed by intellij-monorepo-bot
parent aa0c19fe12
commit 5dc3290ea3
@@ -202,11 +202,11 @@ public class VcsRepositoryManager implements Disposable, VcsListener {
finally {
REPO_LOCK.writeLock().unlock();
}
BackgroundTaskUtil.syncPublisher(myProject, VCS_REPOSITORY_MAPPING_UPDATED).mappingChanged();
}
finally {
MODIFY_LOCK.unlock();
}
BackgroundTaskUtil.syncPublisher(myProject, VCS_REPOSITORY_MAPPING_UPDATED).mappingChanged();
}
@NotNull