-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
doOnUnsubscribe behaviour does not align with documentation #3877
Comments
You get two calls because the two subscribers create two separate chains up until the |
Yes I follow what is happening but this does not seem to align with the documentation where it says the source observable is modified to call doOnUnsubscribe, and that if the source observable is ref counted then it should only happen once. |
Ah, yes, that statement is invalid. Would you like to submit a PR and fix that? |
Certainly, is the intention to fix the documentation to match the actual behavour? |
Fix the documentation. |
See my proposed updates to the javadoc in #3907 |
Closing via #3907. |
Hi,
According to the documentation here, when my source observable is reference counted I should only be notified of the final subscriber's unsubscription, however, unless I am misunderstanding the term source - or misusing it, it appears to be called on every subscriber's unsubscription.
Below is a simple test which demonstrates what I mean -
onUnsubscribeAfterRefCount
will fail, whileonUnsubscribeBeforeRefCount
will passThe text was updated successfully, but these errors were encountered: