spierce7
10/12/2018, 3:47 PMRendezvousChannel
. The RendezvousChannel
seems like a PublishSubject
from RX, but the documentation says something that worries me: An element is transferred from sender to receiver only when send and receive invocations meet in time
So I understand that before I start listening to the Channel
, all events emitted to it won't be received. Is it possible though that if I'm already listening to events on the Channel
that I'll miss any?Vsevolod Tolstopyatov [JB]
10/12/2018, 4:02 PMPublishSubject
is rather ConflatedBroadcastChannel
than RendezvousChannel
. In RendezvousChannel
element can be received only by one consumer.
RendezvousChannel
documentation tries to say that sender is suspended until it meets the receiver. You can treat RendezvousChannel
as suspending version of BlockingArrayQueue
with zero capacity (java.util.TransferQueue
actually).spierce7
10/12/2018, 4:20 PMConflatedBroadcastChannel
more like a BehaviorSubject
, as all subscribers immediately receive the current value upon subscription?PublishSubject
, which is that all receivers are guaranteed to receive every item emitted after subscription, and all items emitted before subscription are lost to that receiver?David W
10/12/2018, 5:26 PMprivate val sender = BroadcastChannel<State>(Channel.CONFLATED)
val broadcaster = sender.openSubscription().asPublisher()
spierce7
10/12/2018, 5:35 PMVsevolod Tolstopyatov [JB]
10/13/2018, 12:12 PMConflatedBroadcastChannel
is similar to BehaviorSubject
(still can’t get used to *Subject
terminology).
all receivers are guaranteed to receive every item emitted after subscription, and all items emitted before subscription are lost to that receiver?This is plain
BroadcastChannel
.