r4zzz4k
12/22/2017, 9:06 PMprivate val connectedChannel = ConflatedBroadcastChannel<Boolean>() // has send() modification method
val connected: ReceiveChannel<Boolean> // has a read-only interface
get() = connectedChannel.openSubscription()
There are several pairs of such properties in a class.
Coroutines are just one of many examples, there are much more use cases.
Does anybody know the way to avoid this repetitiveness?