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

Concat #273

Merged
merged 4 commits into from
May 16, 2013
Merged

Concat #273

merged 4 commits into from
May 16, 2013

Conversation

billyy
Copy link
Contributor

@billyy billyy commented May 15, 2013

Add new unit test to cover non-blocking subscribe() for Concat operator.

Treora and others added 4 commits May 14, 2013 22:47
The concat operator previously blocked on calling subscribe until all the
sequences had finished. In quite some cases this results in unwanted (and
unexpected) behaviour, such as when prefixing an infinite Observable
with a fixed one, for example when using startWith (which calls concat):
someInputStream.startWith(123).subscribe(x -> print(x));
This statement will block indefinitely if the input stream is infinite. Also
on finite sequences it seems silly to have to wait for them to finish.

In this new approach the incoming observables are put into a queue, instead
of waiting for the whole sequence to finish. When the first observable
completes, the next one is taken from the queue and subscribed to, and so
on. The queue can be extended while processing the observables, and
onCompleted is only called when both the source of observables has completed
and all observables in the queue have been read.
@cloudbees-pull-request-builder

RxJava-pull-requests #148 SUCCESS
This pull request looks good

@benjchristensen
Copy link
Member

Thank you @Treora for fixing this and @billyy for the code review and new unit tests.

benjchristensen added a commit that referenced this pull request May 16, 2013
@benjchristensen benjchristensen merged commit 58951bd into ReactiveX:master May 16, 2013
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
…eX#438)

Issue ReactiveX#273: Added remove method to AbstractRegistry.
Issue ReactiveX#273: Added replace method to AbstractRegistry.
Issue ReactiveX#327: MicroMeter tagged Metric classes are automatically updated when an entry is added, removed or replaced in AbstractRegistry.
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.

4 participants