[starter] LocalEventsFlow: use one runBlocking instead of many

GitOrigin-RevId: 1cb19330ba10e30a3b4f8935bf4b9d930174b508
This commit is contained in:
Anastasia Katsman
2025-10-07 17:13:18 +00:00
committed by intellij-monorepo-bot
parent dbd71639f9
commit 009f9c8f38
@@ -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()) {