Skip to content

Multiple Zipped Observers never complete #1812

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

Closed
stevemenke opened this issue Oct 30, 2014 · 1 comment
Closed

Multiple Zipped Observers never complete #1812

stevemenke opened this issue Oct 30, 2014 · 1 comment
Labels
Milestone

Comments

@stevemenke
Copy link

The following code never executes the onComplete if the number is greater than 1025. I think it has to due with back pressure which uses a default request of 1024. I am using Java 8

    Observable merged1 = Observable.zip(Observable.range(0, 1026), Observable.range(0, 1026),
            (o, e) -> new int[]{o, e});
    Observable merged2 = Observable.<int[], Integer, int[]>zip(merged1, Observable.range(0, 1026),
            (o, e) -> new int[]{o[0], o[1], e}).serialize();
    merged2.subscribe(
            (o) -> System.out.println(o),
            e -> {},
            () -> {
                System.out.println("This never prints");
            }
    );

I am using the following version of Java.

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

@zsxwing
Copy link
Member

zsxwing commented Oct 31, 2014

Thanks for reporting it.

benjchristensen added a commit that referenced this issue Oct 31, 2014
Fix issue #1812 that zip may swallow requests
@benjchristensen benjchristensen added this to the 1.0 milestone Oct 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants