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

behavior of concat(Observable<Observable<T>>) #202

Closed
abliss opened this issue Mar 20, 2013 · 1 comment
Closed

behavior of concat(Observable<Observable<T>>) #202

abliss opened this issue Mar 20, 2013 · 1 comment

Comments

@abliss
Copy link
Contributor

abliss commented Mar 20, 2013

I have a question about the behavior of concat when given an observable of observables. Currently, it seems to materialize its input into a list, then concat the list. This runs counter to my expectation, which would be that new observables could be produced while the concat is underway. In other words, (a) elements from the first Observable should be rendered by concat() even if the Observable<Observable> is blocked, and (b) the concat()ed observable should not start pulling elements from the next Observable (or call onCompleted) until the current Observable calls onCompleted.

I have written a failing unit test which illustrates the behavior I was expecting:
https://gist.github.com/abliss/5205333

My question, then is (1) does this match the behavior of .net, (2) if so, is this a design decision you're comfortable emulating, and (3) if so, does this match everyone else's intuition given the current documentation (which is silent on this issue)?

If the answer to any of the above is "no", I'm happy to provide a patch.

@billyy
Copy link
Contributor

billyy commented Mar 21, 2013

The Observable of Observable in Concat was something I put in last minute
for completeness. It was NOT the desired implementation. I meant to
update that code, but never got around to it. If you have patch, please
send it. I probably will take a look at this weekend again. Thanks for
bringing this up.

On Wed, Mar 20, 2013 at 8:01 AM, abliss [email protected] wrote:

I have a question about the behavior of concat when given an observable of
observables. Currently, it seems to materialize its input into a list, then
concat the list. This runs counter to my expectation, which would be that
new observables could be produced while the concat is underway. In other
words, (a) elements from the first Observable should be rendered by
concat() even if the Observable<Observable> is blocked, and (b) the
concat()ed observable should not start pulling elements from the next
Observable (or call onCompleted) until the current Observable calls
onCompleted.

I have written a failing unit test which illustrates the behavior I was
expecting:
https://gist.github.com/abliss/5205333

My question, then is (1) does this match the behavior of .net, (2) if so,
is this a design decision you're comfortable emulating, and (3) if so, does
this match everyone else's intuition given the current documentation (which
is silent on this issue)?

If the answer to any of the above is "no", I'm happy to provide a patch.


Reply to this email directly or view it on GitHubhttps://github.com//issues/202
.

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

2 participants