salomonbrys
06/25/2018, 2:30 PMBroadcastChannel
is a SendChannel
, but not a ReceiveChannel
. To get a ReceiveChannel
from a BroadcastChannel
, you need to call openSubscription
.
bind() from singleton { BroadcastChannel<SyncEvents>(Channel.CONFLATED) }
bind<ReceiveChannel<SyncEvents>>() with provider { instance<BroadcastChannel<SyncEvents>>().openSubscription() }