Perform tryLock-and-checkCanceled on waiting lock in LockBasedStorageManager
Relates to #KT-38012
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.context
|
||||
|
||||
import com.intellij.openapi.progress.ProgressManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
@@ -85,7 +86,9 @@ class MutableModuleContextImpl(
|
||||
|
||||
fun GlobalContext(debugName: String): GlobalContextImpl {
|
||||
val tracker = ExceptionTracker()
|
||||
return GlobalContextImpl(LockBasedStorageManager.createWithExceptionHandling(debugName, tracker), tracker)
|
||||
return GlobalContextImpl(LockBasedStorageManager.createWithExceptionHandling(debugName, tracker) {
|
||||
ProgressManager.checkCanceled()
|
||||
}, tracker)
|
||||
}
|
||||
|
||||
fun ProjectContext(project: Project, debugName: String): ProjectContext = ProjectContextImpl(project, GlobalContext(debugName))
|
||||
|
||||
Reference in New Issue
Block a user