is there an operator to plumb the output of one fl...
# coroutines
w
is there an operator to plumb the output of one flow as the input to another (sharedflow)
z
MutableSharedFlow
implements
FlowCollector
, so you can just do
upstreamFlow.collect(sharedFlow)
😮 1
👌 1
w
cool, haven't seen that before. thanks
Following up here - it seems like that method is an internal coroutines api
z
oh right, can you do
upstreamFlow.collect(sharedFlow::emit)
?
w
yeah i can, was just curious if there was something that was a little cleaner. could create my own extension if i really wanted to. thanks!
z
None that i’m aware of but happy to be proven wrong