spierce702/05/2019, 7:21 PM
allows for the loss of events after subscription, while
guarantees all events to be delivered. I've tried swapping to an
to help ensure all events are delivered, but I have no way to ensure that the current value is delivered to a new subscriber upon a new subscription being opened. Any suggestions?
julioyg02/05/2019, 9:15 PM
or so the doc says,
only delivers the last value, the rest of them get lost
spierce702/05/2019, 11:14 PM
I'm guaranteed to receive all 4 events to all subscribers. If I call
behaviorSubject.onNext(1) behaviorSubject.onNext(2) behaviorSubject.onNext(3) behaviorSubject.onNext(4)
I'm only guaranteed to receive the 4th event on my subscribers. It's very likely that with the above code, I'll actually only receive the 1st and 4th event, and the 2nd and 3rd event will be lost. In fact, that's what I'm seeing consistently in my code running only on my Android main thread.
conflatedBroadcastChannel.send(1) conflatedBroadcastChannel.send(2) conflatedBroadcastChannel.send(3) conflatedBroadcastChannel.send(4)