haroldadmin
06/03/2019, 6:21 AMRendezvousChannel in the place of PublishSubject from RxJava in a project, but I need a way to access the current element in the channel without removing it. Something like a 'peek' operation on a LinkedBlockingQueue.
Now a RendezvousChannel has a method called poll() which does give me the current element (or null) but it also removes it from the channel. How can I perform a peek operation on a channel then?louiscad
06/03/2019, 7:54 AMConflatedBroadcastChannel which is the correct analogue to RxJava's PublishSubject.gildor
06/03/2019, 7:54 AMlouiscad
06/03/2019, 7:58 AMConflatedBroadcastChannel has a value property to get last value without removing it though, so it suits the use case here.gildor
06/03/2019, 8:02 AMharoldadmin
06/03/2019, 8:03 AMPublishSubject with BehaviourSubject. A BehaviourSubject is what I meant to say.
ConflatedBroadcastChannel looks to be the tool I need. Thanks for your help!