What's the equivalent of Rx's `PublishProcessor` i...
# coroutines
a
What's the equivalent of Rx's
PublishProcessor
in the Coroutines world?
From what I know that Coroutines has Channels but do they support the same backpressure capabilities as PublishProcessor?
s
A BroadcastChannel
a
Thanks, however I know that ConflatedBroadcastChannel applies something like onBackpressureLatest(), is there something like onBackpressureBuffer? So that I don't want to lose any events that might get backpressured
s
Don't BroadcastChannel constructor(-function)s take a backpressure parameter? (I'm not sure, since I can't access kdoc easily) Update: they do have a
capacity
parameter, which you can use to configure the buffer/backpressure
👍 1
b
Conflated is only one of many different types of channels :) default is rendezvous if the producer is faster than the consumer, another is a fixed size buffer, and the other that I can remember right now is unlimited buffer which just builds up a linked list