-
Notifications
You must be signed in to change notification settings - Fork 70
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
Lost events from subscriptions if multiple fire at the same time #402
Comments
With an overly specific test case, the previous behavior was a "bug". Example: Two signals being subscribed to, signalA and signalB, and a state where if we're not "loading" we don't want to subscribe anymore, eg:
Both
|
Talked with @zach-klippenstein about how this is handled on the Kotlin side: Thus, the behavior in the example above would be: To add this behavior, we need to:
If this is added, a similar behavior should likely be applied to |
#1048 fixes this. |
Prior to the concurrency changes in 0.17, if two signals fired at the same time (same runloop), both actions would be received (across two render passes, assuming the subscription was still maintained).
With the most recent changes, only the first subscription's action is received, and the second is silently dropped. This appears to be due to how subscription/signal handling was changed. Prior, it was done through a signal of signals, that were flatMap'd with "latest" and with a constant observation on the output of events. This changed to have the signal subscribe on each pass (after being merged together).
The behavior, at a minimum, is now surprising.
Either
or
If restoring the previous behavior, we must assure that it's the updated action handling - there may have previously been a bug where the second signal firing was handled with the rules of the previous render loop - and thus might have caused an action that wasn't declared (need to investigate this).
The text was updated successfully, but these errors were encountered: