-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior WhileSubscribed #2863
Labels
Comments
Thanks for the report! The issue seems to have the same root cause as #2488 Self-contained reproducer:
|
qwwdfsad
added a commit
that referenced
this issue
Aug 11, 2021
pablobaxter
pushed a commit
to pablobaxter/kotlinx.coroutines
that referenced
this issue
Sep 14, 2022
…#2872) * Non-conflating subscription count in SharedFlow and StateFlow Sharing strategies are too sensitive to conflation around extrema and may miss the necessity to start or not to stop the sharing. For more particular examples see Kotlin#2863 and Kotlin#2488 Fixes Kotlin#2488 Fixes Kotlin#2863 Fixes Kotlin#2871
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the documentation:
However,
stopTimeout
is not refreshed on new subscriptions. I also asked this question here.Another ephemeral example on Android:
Each click on the button should delay the completion of
instantFlow
, but this does not happen, the flow will end after a time equal tostopTimeout
, ignoring the subscriptions that occur ineventFlow
.I have little experience with kotlin coroutines and I may be doing something wrong. Is this the expected behavior?
The text was updated successfully, but these errors were encountered: