mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[starter] LocalEventsFlow: use one runBlocking instead of many
GitOrigin-RevId: 1cb19330ba10e30a3b4f8935bf4b9d930174b508
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dbd71639f9
commit
009f9c8f38
+5
-2
@@ -116,15 +116,18 @@ class LocalEventsFlow : EventsFlow {
|
||||
}
|
||||
return@map result
|
||||
}
|
||||
?.forEach {
|
||||
runBlocking {
|
||||
// awaitAll shouldn't be used as it would stop after the first exception from any coroutine
|
||||
tasks?.forEach {
|
||||
try {
|
||||
runBlocking { it.await() }
|
||||
it.await()
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
LOG.info("Exception occurred while processing $e")
|
||||
exceptions.add(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOG.debug("All exceptions: $exceptions")
|
||||
if (exceptions.isNotEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user