mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-83 assert plugin scopes are cancelled similar to project/app
GitOrigin-RevId: 2aa46992f9ee960052aea6f87a7b0e3bbd7885f8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
82000423a6
commit
9e9e4e26bc
@@ -560,7 +560,12 @@ object DynamicPlugins {
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
val waitForCompletion = GlobalScope.launch {
|
||||
for (classLoader in classLoaders) {
|
||||
classLoader.pluginCoroutineScope.coroutineContext.job.join()
|
||||
val pluginJob = classLoader.pluginCoroutineScope.coroutineContext.job
|
||||
if (!pluginJob.isCancelled) {
|
||||
LOG.error("Plugin scope is expected to be cancelled during unloading")
|
||||
pluginJob.cancel()
|
||||
}
|
||||
pluginJob.join()
|
||||
}
|
||||
}
|
||||
while (waitForCompletion.isActive) {
|
||||
|
||||
Reference in New Issue
Block a user