I have a ArrayBroadcastChannel, which I subscribe ...
# coroutines
s
I have a ArrayBroadcastChannel, which I subscribe to like channel.asFlow().launchIn(scope) between launchIn <-> flow.onStart is about 100-150ms so all items I emit in those 150ms are lost can I subscribe to this channel in some blocking way, so every emit after launchIn would be collected? I’m currently tied to coroutines 1.3.9 because of other dependencies, also Conflated channel is redundant in my case
e
Don't use broadcast channel. Use a regular channel. It guarantees that nothing is lost.
2
s
thank you, works like a charm
z
great read! let me also say not only do these new
SharedFlow
and
StateFlow
constructs work better, they are also named way better! much more intuitive