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) {
|
fun doUpdate(underProgressManager: Boolean = true) {
|
||||||
syncLock.withLock {
|
syncLock.withLock {
|
||||||
val updates = manager.collectRootsAndCheckNew()
|
|
||||||
|
|
||||||
if (!updates.changed) return
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ProgressManager.checkCanceled()
|
val updates = manager.collectRootsAndCheckNew()
|
||||||
|
|
||||||
|
if (!updates.changed) return
|
||||||
|
|
||||||
|
if (underProgressManager) {
|
||||||
|
ProgressManager.checkCanceled()
|
||||||
|
}
|
||||||
|
|
||||||
if (updates.hasNewRoots) {
|
if (updates.hasNewRoots) {
|
||||||
notifyRootsChanged()
|
notifyRootsChanged()
|
||||||
|
|||||||
Reference in New Issue
Block a user