https://kotlinlang.org logo
Title
k

karelpeeters

12/15/2019, 6:35 PM
Looks like
ReceiveChannel.last()
is deprecated, it links to https://github.com/Kotlin/kotlinx.coroutines/issues/254 but what do I actually have to replace it by?
d

Dominaezzz

12/15/2019, 6:59 PM
How is your
ReceiveChannel
being created? You might be able to replace it with
Flow
. (Although you'd be moving from deprecated warnings to some experimental warnings lol).
k

karelpeeters

12/15/2019, 7:01 PM
It's basically a bunch of objects that have an input and an output channel and they're connected in a cyclic graph, and I want to get the last output of one of them.
d

Dominaezzz

12/15/2019, 7:04 PM
Hmm, cycle, sounds naughty.... I guess you could do
.consumeAsFlow().last()
.
k

Kroppeb

12/15/2019, 7:05 PM
Sounds like the amplifier problem for aoc =)
k

karelpeeters

12/15/2019, 7:05 PM
What a coincidence 🙂