I have a Flow that produces a stream of values. I ...
# coroutines
d
I have a Flow that produces a stream of values. I want to take that stream and launch a coroutine for each emitted function inside Dispatchers.IO (or something like that). I believe I don't want
.flowOn(<http://Dispatchers.IO|Dispatchers.IO>)
for this — that's the opposite of what I want as it affects where the emission happens. Do I just want to do launch with context inside collect?
Copy code
someFlow().map { ... }.filter{ ... }.collect { x ->
  launch(<http://Dispatchers.IO|Dispatchers.IO>) { doSomethingBlockingWith(x) }
}
Like this?
d
flatMapMarge
?
d
Isn't that for if I'm returning new Flows? I'm not.
d
Oh. Oops.