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

karelpeeters

12/15/2019, 6:42 PM
Similar question, how do I now connect the output of one channel to the input of another? I think
Copy code
output.consumeEach { input.send(it) }
is correct but that's also deprecated.
j

jimn

12/15/2019, 7:00 PM
flatMapConcat or flatMapMerge right?
d

Dominaezzz

12/15/2019, 7:01 PM
You're right except it's experimental and not deprecated I think. https://github.com/Kotlin/kotlinx.coroutines/issues/1080
k

karelpeeters

12/15/2019, 7:02 PM
@jimn Those functions don't seem to exist?
j

jimn

12/15/2019, 7:05 PM
message has been deleted
d

Dominaezzz

12/15/2019, 7:05 PM
They are defined on
Flow
and not
ReceiveChannel
.
k

karelpeeters

12/15/2019, 7:06 PM
Ah I was still on version
1.0.1
that explains a lot 🙂
j

jimn

12/15/2019, 7:07 PM
ok sorry, technically the question is not about flows, , but more like what exists when flows subsume the deprecated thing...
Channels give you fine grained control of almost everything, but my experience witth Flow so far is that you get a howwitzer, and nothing more and nothing less.
you can't do coordination or or selective handle based meta-control of Flow at this time, and the only syncronization between two flows is zip() right now
if you want to decode three flows in lock step the advice is switch to sequence.