What’s the equivalent of a UnicastSubject in Flow? SharedFlow with a buffer suspend might mimic emission behaviour however what about ensuring emissions aren’t missed if there are no collectors?
j
Joffrey
11/30/2021, 12:51 PM
I'm not an Rx expert, but from what I read from the docs of UnicastSubject it looks like a
Channel
with unlimited buffer +
.consumeAsFlow()
is what you're looking for.
The emitter can
send
to this channel, and the (single) receiver views it as a flow