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

jishindev

04/02/2019, 6:55 AM
Can anyone point me to a stable implementation of Event bus with Kotlin Coroutines which works along with the android lifecycles?
t

tseisel

04/02/2019, 7:33 AM
I don't think such a stable library exists yet, as stable coroutines are quite recent. But you might build an EventBus yourself by wrapping a
BroadcastChannel
: send an instance of a
sealed class
as your message, and all components consuming that channel will receive it.
j

jishindev

04/02/2019, 8:09 AM
Will give that a try. Thanks @tseisel
l

louiscad

04/02/2019, 9:41 AM
EventBus is easy to mess up, beware.
1