ScriptClassRootsUpdater: fix clearing scheduledUpdate and check cancelled in sync
This commit is contained in:
+7
-5
@@ -123,12 +123,14 @@ class ScriptClassRootsUpdater(
|
||||
|
||||
fun doUpdate(underProgressManager: Boolean = true) {
|
||||
syncLock.withLock {
|
||||
val updates = manager.collectRootsAndCheckNew()
|
||||
|
||||
if (!updates.changed) return
|
||||
|
||||
try {
|
||||
ProgressManager.checkCanceled()
|
||||
val updates = manager.collectRootsAndCheckNew()
|
||||
|
||||
if (!updates.changed) return
|
||||
|
||||
if (underProgressManager) {
|
||||
ProgressManager.checkCanceled()
|
||||
}
|
||||
|
||||
if (updates.hasNewRoots) {
|
||||
notifyRootsChanged()
|
||||
|
||||
Reference in New Issue
Block a user