ScriptClassRootsUpdater, updateSynchronously: cancel before waiting for lock
This commit is contained in:
+3
-5
@@ -115,13 +115,11 @@ class ScriptClassRootsUpdater(
|
|||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
private fun updateSynchronously() {
|
private fun updateSynchronously() {
|
||||||
syncLock.withLock {
|
scheduledUpdate?.cancel()
|
||||||
scheduledUpdate?.cancel()
|
doUpdate(false)
|
||||||
doUpdate(false)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun doUpdate(underProgressManager: Boolean = true) {
|
private fun doUpdate(underProgressManager: Boolean = true) {
|
||||||
syncLock.withLock {
|
syncLock.withLock {
|
||||||
try {
|
try {
|
||||||
val updates = manager.collectRootsAndCheckNew()
|
val updates = manager.collectRootsAndCheckNew()
|
||||||
|
|||||||
Reference in New Issue
Block a user