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

Manuel Vivo

10/30/2019, 10:55 AM
What's the recommended way to refer to a conflated channel:
private val channel = ConflatedBroadcastChannel<T>
or
private val channel = BroadcastChannel<T>(Channel.CONFLATED)
?
l

louiscad

10/30/2019, 11:23 AM
If you want to have the ability to retrieve the current value and make the fact that its conflated and keeps the last value a part of the API, you'll want
ConflatedBroadcastChannel
. Otherwise, you can just use your second solution if it's only an implementation detail.
👍 1
m

Manuel Vivo

10/30/2019, 1:11 PM
Makes sense! Thank you
2 Views