Juan Rada
08/08/2022, 2:40 PMprivate suspend fun process() = coroutineScope {
getFlow()
.map { async(<http://Dispatchers.IO|Dispatchers.IO>) { ioBlockingFunction(it) } }
.buffer(20)
.map { it.await() }
.collect()
}
my expectations is that 20 blocking operations will be trigger at time, then they will be awaited and then next 20 blocking operations will be trigger. What I am noticing is that somehow flow stop producing values and my app got block at flow element 25 of 30, or 100 (at a random point), even when flow function has more records to produceStylianos Gakis
08/08/2022, 10:19 PMioBlockingFunction()
somehow is never finishing? And it makes all those 20 parallel actions wait forever?Juan Rada
08/09/2022, 9:56 AM