Pablo
06/08/2021, 1:23 PMflow
that inside does an async{}
call?
For instance
flow<List<Foo>>{
val list = getFromApi()
val one = async(<http://Dispatchers.IO|Dispatchers.IO>)
val two = async(<http://Dispatchers.IO|Dispatchers.IO>)
val correctList = one.await() + two.await()
emit(correctList)
}
Or it's better to use async without flow here?
That's pseudo because to do async
I need a coroutineScope
is there any way to get it from the flow
?Erik
06/08/2021, 1:38 PMcoroutineScope
to do the async
calls. I would do the latter if it really doesn't need to be a flow.Pablo
06/08/2021, 2:10 PMuli
06/08/2021, 2:39 PMZach Klippenstein (he/him) [MOD]
06/08/2021, 6:16 PM