Dougie
09/04/2020, 3:32 AMflatMapConcat
one by one.
flatMapMerge
can not do it, and start coroutines will break the flow
are there any good solutions? thanksDaniele Segato
09/04/2020, 8:48 AMasync { }
)
then you can await them in the order they come.
You basically want what in Rx is called flatMapConcatEager
right?
what I suggest doesn't limit the number of concurrent calls to retrofit.
I think i would try with something like this:
myFlow
.map { input ->
// not sure if there's a way to specify how many concurrent
async { performRetrofitCall(input) }
}
.map { it.await() }
I didn't try it tho', it is just what i would try to do