-
Notifications
You must be signed in to change notification settings - Fork 109
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
listen example is incorrect #170
Comments
See, #155 |
@yasserf: Any feedback on this? |
I think |
@yasserf: Please remind me how this is resolved with the new listen functionality? |
The publisher will be told the subscription was discarded even if the publisher is also the subscriber but the last one in the cluster. This means a publisher should not normally depend on subscribing to something listening in the same client outside of the listen callback. It will work, but with known side effects. |
@yasserf: That just made my head spin... so it will work but not really? |
Ah, so it will receive |
The provider is considered a subscriber if it subscribes to the record outside of the listen function, but if someone else subscribes and unsubscribes that provider will get a subscription stopped, even though it is still subscribed outside of the listen. That's mainly done to reduce operations on hot paths. |
The following example doesn't work as expected since
isSubscribed
would never be false since the listener itself has the last reference...The text was updated successfully, but these errors were encountered: