IJPL-53: Code need full dispatch if Write Intent Lock is not taken.

GitOrigin-RevId: 5fc4a4a92206fe813fdd9795876e1c0fcf02dccc
This commit is contained in:
Lev Serebryakov
2023-07-18 15:31:58 +02:00
committed by intellij-monorepo-bot
parent bee4097a41
commit a8943cc6cc

View File

@@ -42,7 +42,8 @@ class RdCoroutineHost(coroutineScope: CoroutineScope) : RdCoroutineScope() {
}
override fun isDispatchNeeded(context: CoroutineContext): Boolean {
if (!ApplicationManager.getApplication().isDispatchThread) {
val application = ApplicationManager.getApplication()
if (!application.isDispatchThread || !application.isWriteIntentLockAcquired) {
return true
}