-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Merge semantics for race conditions between synchronous notifications #422
Comments
I find it puzzling that the order would be |
Also, with the TestScheduler, there shouldn't be any "race conditions". |
Yes. Both existing RxJS 4 and RxJS Next behaviors are puzzling, I'd also expect |
@Blesh @staltz I have a hunch this is related to the switch from the default trampoline-style scheduling in RxJS4 to the default recursive-style scheduling in RxJS Next. It's possible the first |
No race conditions to see here, just a stupid developer (me) that thought he should sort actual results. derp derp derp... |
This is probably a bug.
While making tests for mergeMap I wrote this marble test based on a RxJS 4 test:
Notice
var expected = '----a---(ba)(ba)(ba)c---c---(dc)c---(c|)'
This test passes for RxJS 4, but does not pass for RxJS Next, which behaves like this
var expected = '----a---(ba)(ab)(ab)c---c---(cd)c---(c|)'
I quickly took a look and tried to solve this for mergeMap, but the problem seemed deeper, related to
subscribeToResult
,InnerSubscriber
, and potentially fromTestScheduler
andVirtualTimeScheduler
too. Might affect many operators, so was beyond the scope of my mergeMap PR #423.The text was updated successfully, but these errors were encountered: