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

Observable('a', 'b', 'c').zip(Observable.interval(100 millis)) never terminates? #484

Closed
dvtomas opened this issue Nov 15, 2013 · 3 comments

Comments

@dvtomas
Copy link

dvtomas commented Nov 15, 2013

Hi,
I'm new to RxJava, please forgive me if this question feels too trivial. I'm currently learning by playing (in Scala), and I was surprised by the observation that

import rx.lang.scala._
import scala.concurrent.duration._
Observable('a', 'b', 'c').zip(Observable.interval(100 millis)).toBlockingObservable.toList

never terminates. After reading the description of zip, I was under the impression that it should complete after (the the shorter one) of the two sequences completes, which in this case is the abc, the interval is infinite. I'd expect the zip to unsubscribe from the collections that have not terminated yet after the first one completes, but it seems not to behave like that.

Is the current behavior intentional?

Thank you,
Tomáš Dvořák

@samuelgruetter
Copy link
Contributor

The current behavior is not what it should be. I've already reported an issue for this: #387 but no one has fixed it yet. Pull requests are welcome ;-)

@benjchristensen
Copy link
Member

The fix is not trivial, I spent some time on it last week and fixing this case is simple but it breaks other use cases. In practice I think the operator needs to be re-implemented from scratch instead of just tweaked for this case.

@benjchristensen
Copy link
Member

This should now be fixed as the zip fixes have been merged.

jihoonson pushed a commit to jihoonson/RxJava that referenced this issue Mar 6, 2020
…andled co… (ReactiveX#484)

* Issue ReactiveX#480: Fixed a bug that CompletiongStage<Void> wasn't handled correctly in CircuitBreaker and Retry as the result was always null.
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

No branches or pull requests

3 participants