dave08
11/01/2017, 10:02 PMproduce { }
for a BroadcastChannel
?elizarov
11/01/2017, 11:45 PMelizarov
11/01/2017, 11:46 PMbroadcast()
extension, so that you can do produce { ... }.broadcast()
. Solves the naming issue.dave08
11/02/2017, 3:13 AMpublish()
in rx, but then there would be the overhead of chaining the regular Channel
in produce { }
to a BroadcastChannel
when .broadcast()
is called.
I was thinking of using this for broadcasting Android UI components to my business logic layer, which is lots of usage...
Maybe the overhead is worth the semantics, but you could always use broadcast { }
, coBroadcast { }, coProduce{ }
or have a class be imported import Coroutine.*
to namespace both like RxJava Observable
class.
Even if it would be a top level function, if there's a clash in naming, one couldn't do import ...broadcast AS coBroadcast
. Or is that only for classes?