-
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
Any/All should not unsubscribe downstream. #1938
Conversation
Thanks, I'll give this a go and verify it fixes it for me. Others that look like they may be susceptible: OperatorAll |
Thanks for the other cases. I'll add the fixes for them in this PR. |
I find While we are at it, I think Any and All should request(Long.MAX_VALUE) regardless of the downstream because they spin on a single flag and thus can handle any throughput. The current version request 1-by-1 which adds large overhead. |
Agreed.
We would have to manually compose through the backpressure if we break the chain. Why though should we need to decouple on those as they shouldn't need to unsubscribe early? If we are we probably shouldn't be. Having them chained is far more efficient so we don't want to break the chain if we don't need to. |
They unsubscribe themselves in |
But why do they need to |
Because they need to terminate a companion observable or timer when the main terminates. |
I know they need to cleanup, but why does it need to happen eagerly right then? The contract is that after it emits For all three it seems there is no need to be eager as these do not terminate their origin early. Cleanup of their companion Observable can happen eager if they want (such as |
Any/All should not unsubscribe downstream.
Merging as this PR is fine, the discussion is about other things. |
Should fix issue #1935
When in doubt, see
take
.