https://kotlinlang.org logo
#coroutines
Title
# coroutines
j

jean

11/03/2020, 7:48 AM
The doc on 
StateFlow
 contains this statement:
So a slow collector skips fast updates, but always collects the most recently emitted value.
What’s the actual threshold that makes it skip states? Do I need to add a
delay
call if I want to force some State to NOT be skipped?
t

Tijl

11/03/2020, 7:54 AM
there is no threshold. if the collector does not collect before the next value is emited, it will miss it
☝️ 2
if you want a buffer then use SharedFlow (new in
kotlinx.coroutines
1.4)
j

jean

11/03/2020, 8:00 AM
ok I understand, thanks 🙂