Skip to content
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

Zip: completes as soon as any source completed #537

Merged
merged 8 commits into from
Sep 23, 2020

Conversation

hoc081098
Copy link
Contributor

Fixes #525

@coveralls
Copy link

coveralls commented Aug 9, 2020

Coverage Status

Coverage decreased (-0.008%) to 92.46% when pulling 88e8f53 on hoc081098:hoc081098/zip_completed into f2642a8 on ReactiveX:master.

rx/core/observable/zip.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@MainRo MainRo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! Looks good to me

@MainRo MainRo merged commit ea7c5a4 into ReactiveX:master Sep 23, 2020
MainRo added a commit to MainRo/RxPY that referenced this pull request Jan 22, 2022
The original fix for ReactiveX#525 breaks sequences where some observables emit
item faster than other ones. By completing too soon, the remaining
observables cannot catchup later. A very simple case is in ReactiveX#578 where
the two observables to zip emit their items sequentially.

We can fix both issues by completing whenever an observable completes
and there is no queued item. Otherwise we let the remaining observables
a chance to emit new items before completion.
MainRo added a commit that referenced this pull request Feb 6, 2022
The original fix for #525 breaks sequences where some observables emit
items faster than other ones. By completing too soon, the remaining
observables cannot catch up later. A very simple case is in #578 where
the two observables to zip emit their items sequentially.

We can fix both issues by completing whenever an observable completes
and there is no queued item. Otherwise, we let the remaining observables
a chance to emit new items before completion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zip operator should complete if a single upstream source completes
3 participants