<https://stackoverflow.com/questions/56613415/a-pu...
# announcements
t
What do you think of using coroutines
BroadcastChannel
for that purpose ? https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/-broadcast-channel/index.html You publish with
Copy code
channel.send(event)
Multiple consumers can subscribe with
Copy code
channel.consumeEach { event ->
    // Handle the event
}
f
Actually
BroadcastChannel
is what I need. But as you may know, it's experimental yet and might have breaking changes in the future.
t
You may stick with Rx `PublishSubject`/`PublishProcessor` for now, it is roughly equivalent
f
Yeah, it seems to be the best available option for me. Thanks.