I have a StateFlow<SyncState> which is written to by coroutines running on
Dispatchers.IO
I collect this in a ViewModel to drive UI, so the scope is driven by Dispatchers.Main
I also collect this in some other place, where the scope is driven by IO
Sometimes the ui driven collector doesnt receive emits (and the io collector does, so the StateFlow does actually gets written to correctly), randomly, like 1 in 10-15
I suspect this is when the writes are too close together in time?
Is there a legitimate reason for all emits to be dropped in Main threaded collector due to some backpressure or something? Shouldnt I atleast see the last emit? (And yes the scope is still active, I checked)
Bug?