How would you do parallel processing with `Flow` ?...
# coroutines
t
How would you do parallel processing with
Flow
? 1. Map T to a
Deferred<R>
, then await each ? 2. Use plain coroutines with channels ?
t
Wouldn't it makes more sense to pass a
CoroutineDispatcher
instead of an
ExecutorService
, since we are dealing with flows, then
launch
coroutines instead of submiting tasks ?
r
Use LiveData.map with a Livedata builder
Than create a suspend function that takes a user and returns a Map<User, Address >