https://kotlinlang.org logo
#coroutines
Title
# coroutines
t

tseisel

11/08/2019, 9:36 AM
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

tseisel

11/08/2019, 1:39 PM
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

rkeazor

11/08/2019, 3:11 PM
Use LiveData.map with a Livedata builder
Than create a suspend function that takes a user and returns a Map<User, Address >