-
Notifications
You must be signed in to change notification settings - Fork 2
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
Review request #1
Comments
Hi! I found two potential problems callbag-concat-map/src/index.js Lines 25 to 27 in 3d72d8a
Maybe this line should not happen, because the outer source could still emit some data, and we shouldn't complete it just yet. And callbag-concat-map/src/index.js Lines 60 to 62 in 3d72d8a
I think we should queue the complete as well, just like queuing |
var makeLogger = label => (...vals) => console.log(label, ...vals)
Rx.Observable
.interval(300)
.concatMap(outer =>
Rx.Observable
.interval(1000)
.map(inner => `${outer}: ${inner}`)
.do(makeLogger('tapped:'))
.take(2)
)
.take(3)
.subscribe(makeLogger('got:')) it seems that outer completion propagates immediately. |
Can't say I understand them right now, but certainly will study the notation and those tests later 😉 Thanks for the input and pointing me to those tests! |
I've studied those marble diagrams and from 1st linked test I can see how it describes what happens in issue number 2 (that outer completion has to be queued too). I don't see issue with this code though: callbag-concat-map/src/index.js Lines 25 to 27 in 3d72d8a
It seems to me that at least this part of the code is highly needed and correct. It subscribes to queued inner source when previous inner completes - future outer emissions are irrelevant for this part of the code. If you believe there is still issue with this part please raise your concern 😅 |
@staltz @franciscotln @erikras
would love review of this code, because I had few iterations of it and i think it is finally covering correct behaviour, but I'm still a little bit unsure 😉
The text was updated successfully, but these errors were encountered: