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

Zipping a finite and an infinite Observable #539

Merged
merged 1 commit into from
Dec 3, 2013

Conversation

samuelgruetter
Copy link
Contributor

Here are 4 tests testing that zipping a finite and an infinite Observable results in a finite Observable. The third of them fails...

@cloudbees-pull-request-builder

RxJava-pull-requests #467 FAILURE
Looks like there's a problem with this pull request

@samuelgruetter
Copy link
Contributor Author

@cloudbees-pull-request-builder yes I know, this failure is intended ;-)

@samuelgruetter
Copy link
Contributor Author

@akarnokd wdyt?

@akarnokd
Copy link
Member

Sorry about this. See my PR for the fix.

benjchristensen added a commit that referenced this pull request Dec 3, 2013
Zipping a finite and an infinite Observable
@benjchristensen benjchristensen merged commit fd7982a into ReactiveX:master Dec 3, 2013
@slorber
Copy link

slorber commented Dec 6, 2013

hello @samuelgruetter @akarnokd

On the reactive programming course on Coursera I think I met this bug.
It was asked to create some kind of timeout Observable.

I tried to use zip for that:

Observable.interval(1 second).zip(Observable(0 to intTotalSec)).subscribe(
        t => { println("Received " + t) },
        e => { println("Error: " + e) },
        () => { println("Timeout") }
      )

It prints what I expected, except the timeout never completes.
So in the end I used the takeUntil with a filtered interval.

Does your pull request fix my usecase?

This PR has been mentionned in this Coursera forum post:
https://class.coursera.org/reactive-001/forum/thread?thread_id=1734

@akarnokd
Copy link
Member

akarnokd commented Dec 6, 2013

Hi @slorber. This PR fixes the bug and your example should terminate correctly..

@slorber
Copy link

slorber commented Dec 7, 2013

thanks!

rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
Zipping a finite and an infinite Observable
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
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.

5 participants