What’s the most idiomatic way to transform a flow ...
# coroutines
c
What’s the most idiomatic way to transform a flow with multiple threads? Let’s say I have a flow that contains suspend lambdas and I want to transform it to a flow that contains the result of those lambdas, but do it with 16 threads. I know how I would do it with channels, but aber flows more suitable?
c
thanks! does that mean for now I best use a channel?
o
I’m curious, is there an explicit reason why you’re apprehensive about channels?
g
You can use flatMap instead, which maps over multiple concurrent flows
c
I’m not apprehensive about channels, I just thought maybe theres a way to do it with flows that I don’t know about.
basically just like the example from the github issue.