mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[debugger-rd] IJPL-186922: Don't initialize RemoteApiRegistry on EDT
GitOrigin-RevId: 99e071fa2504fe59c50dfda82a52c4ba63b90b27
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b4c9e4b293
commit
54b7c7cf41
@@ -1,9 +1,12 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.rpc
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.UI
|
||||
import fleet.rpc.RemoteApi
|
||||
import fleet.rpc.RemoteApiDescriptor
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
interface RemoteApiProviderService {
|
||||
|
||||
@@ -11,7 +14,9 @@ interface RemoteApiProviderService {
|
||||
|
||||
companion object {
|
||||
suspend fun <T : RemoteApi<Unit>> resolve(descriptor: RemoteApiDescriptor<T>): T {
|
||||
return ApplicationManager.getApplication().getService(RemoteApiProviderService::class.java).resolve(descriptor)
|
||||
return withContext(Dispatchers.IO) {
|
||||
ApplicationManager.getApplication().getService(RemoteApiProviderService::class.java).resolve(descriptor)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user