Skip to content

1.x: fix Amb sharing the choice among all subscribers #3645

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

Merged
merged 1 commit into from
Jan 25, 2016

Conversation

akarnokd
Copy link
Member

The OnSubscribeAmb shared the choice variable among all of its subscribers which prevented reusing the same Observable.

@akarnokd akarnokd added the Bug label Jan 25, 2016
@@ -288,5 +288,26 @@ public void call(Object t) {
}).ambWith(Observable.just(2)).toBlocking().single();
assertEquals(1, result);
}


@Test(timeout = 1000)
Copy link
Member

Choose a reason for hiding this comment

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

Why not use TestScheduler to avoid using timeout?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't really matter.

Copy link
Member

Choose a reason for hiding this comment

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

okey. not a big deal.

@zsxwing
Copy link
Member

zsxwing commented Jan 25, 2016

👍

akarnokd added a commit that referenced this pull request Jan 25, 2016
1.x: fix Amb sharing the choice among all subscribers
@akarnokd akarnokd merged commit 5ab00f9 into ReactiveX:1.x Jan 25, 2016
@akarnokd akarnokd deleted the AmbStateFix1x branch January 25, 2016 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants