elizarov
11/16/2020, 1:18 PMdave08
11/18/2020, 10:30 AMsuspend fun postEvent(event: Event) {
_events.emit(event) // suspends until subscribers receive it
}
Does is suspend until all subscribers receive it, or just the first one? Is that configurable?elizarov
11/18/2020, 10:31 AMdave08
11/18/2020, 10:47 AMWith the shared flow, events are broadcast to an unknown number (zero or more) of subscribers. In the absence of a subscriber, any posted event is immediately dropped.There really isn't a way to add functionality to
SharedFlow
do such a thing without channels? Will it be added in the future, or is it some kind of limitiation of SharedFlow
?elizarov
11/18/2020, 10:48 AMdave08
11/18/2020, 10:48 AMelizarov
11/18/2020, 10:49 AMdave08
11/18/2020, 10:50 AMelizarov
11/18/2020, 11:08 AMdave08
11/18/2020, 11:27 AMelizarov
11/18/2020, 11:33 AMBroadcastChannel
, in essence, was a misnomer. We invented this name before we had sketched out the concept of a flow. As soon as we did it, we immediately saw that it is, conceptually, a flow, not a channel.dave08
11/18/2020, 11:39 AMBroadcastChannel
will be removed or renamed?elizarov
11/18/2020, 12:26 PMBroadcastChannel
will be deprecated and removed in the future.dave08
11/18/2020, 12:28 PMSingleShotEventBus
for multiple listeners needs to use receiveAsFlow().shareIn(..)
... I guess all this is starting to make sense now.. thanks alot!elizarov
11/18/2020, 12:30 PMshareIn
. Just receiveAsFlow()
psh
11/18/2020, 7:23 PMelizarov
11/18/2020, 8:19 PM