spierce7
02/05/2019, 6:14 PMSubjectChannelAllan Wang
02/05/2019, 6:14 PMAllan Wang
02/05/2019, 6:14 PMspierce7
02/05/2019, 6:15 PMChannelBroadcastChannelspierce7
02/05/2019, 6:16 PMstreetsofboston
02/05/2019, 6:22 PMlaunch { channel.send(item) }channel.offer(item)spierce7
02/05/2019, 6:23 PMstreetsofboston
02/05/2019, 6:25 PMofferfalsespierce7
02/05/2019, 6:25 PMsendBroadcastChannelstreetsofboston
02/05/2019, 6:25 PMstreetsofboston
02/05/2019, 6:26 PMspierce7
02/05/2019, 6:26 PMstreetsofboston
02/05/2019, 6:27 PMlaunchsendspierce7
02/05/2019, 6:27 PMsendJoris PZ
02/05/2019, 6:27 PMJoris PZ
02/05/2019, 6:27 PMspierce7
02/05/2019, 6:29 PMstreetsofboston
02/05/2019, 6:29 PMstreetsofboston
02/05/2019, 6:30 PMsendlaunchspierce7
02/05/2019, 6:31 PMstreetsofboston
02/05/2019, 6:32 PMAllan Wang
02/05/2019, 6:32 PMspierce7
02/05/2019, 6:32 PMAllan Wang
02/05/2019, 6:33 PMstreetsofboston
02/05/2019, 6:34 PMChannelselectsendstreetsofboston
02/05/2019, 6:35 PMAllan Wang
02/05/2019, 6:35 PMproducespierce7
02/05/2019, 6:36 PMspierce7
02/05/2019, 6:37 PMofferunsafestreetsofboston
02/05/2019, 6:37 PMofferfalsesendstreetsofboston
02/05/2019, 6:38 PMofferonNextAllan Wang
02/05/2019, 6:38 PMstreetsofboston
02/05/2019, 6:40 PMofferofferAllan Wang
02/05/2019, 6:41 PMspierce7
02/05/2019, 6:59 PMConflatedBroadcastChannelprivate val broadcastChannel: BroadcastChannel<T> by lazy { ConflatedBroadcastChannel(performGet()) }ArrayBroadcastChannelspierce7
02/05/2019, 6:59 PMAllan Wang
02/05/2019, 7:01 PMspierce7
02/05/2019, 7:09 PMspierce7
02/05/2019, 7:09 PMgildor
02/06/2019, 12:58 AMAllan Wang
02/06/2019, 1:38 AMgildor
02/06/2019, 2:00 AMgildor
02/06/2019, 2:01 AMgildor
02/06/2019, 2:01 AMgildor
02/06/2019, 2:03 AMAllan Wang
02/06/2019, 2:03 AMgildor
02/06/2019, 2:29 AMBut they both will emit the message before subscription if it existsThey emiy nothing if there are no subscribers, just save value
spierce7
02/06/2019, 9:10 PMbehaviorSubject.onNext(1)
behaviorSubject.onNext(2)
behaviorSubject.onNext(3)
behaviorSubject.onNext(4)conflatedBroadcastChannel.send(1)
conflatedBroadcastChannel.send(2)
conflatedBroadcastChannel.send(3)
conflatedBroadcastChannel.send(4)streetsofboston
02/06/2019, 9:13 PMbehaviorSubjectobserveOn(scheduler)gildor
02/07/2019, 6:17 AMI’m guaranteed to receive all 4 events to all subscribers.@spierce7 It’s not true, exactly what Anton said, it depends also on your schedulers and back pressure strategy. there is no way to guarantee that with BehaviorSubject you get all the updates
spierce7
02/07/2019, 7:09 AMBehaviorSubjectgildor
02/07/2019, 7:09 AMsubject.toFlowable(SOME_BACKPRESSURE)gildor
02/07/2019, 7:10 AMsubject.hide()gildor
02/07/2019, 7:11 AMThey guarantee all eventsIs there anything in docs about this? If so, why do you need all the events for BehaviorSubject, what is use case of that?
spierce7
02/07/2019, 7:13 AMspierce7
02/07/2019, 7:14 AMspierce7
02/07/2019, 7:15 AMYou have a flow of no more than 1000 elements at its longest: i.e., you have so few elements over time that there is practically no chance for OOME in your application.gildor
02/07/2019, 7:17 AMspierce7
02/07/2019, 8:36 AMgildor
02/07/2019, 8:42 AMgildor
02/07/2019, 8:43 AM