-
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
How to get immediate subscription result using VirtualTimeScheduler #1889
Comments
This is because by default virtualTimeScheduler limits maximum frames to be executed. Internally, virtualTimeScheduler specifies 'frame time factor' to For immediate workaround, I've amended snippet bit (http://www.webpackbin.com/E12aigmqb), let scheduler = new VirtualTimeScheduler();
+//picked any suffeciently large number can include all frames expected to be executed
+scheduler.maxFrames = 75000;
let a$ = O.interval(1000, scheduler).map(a => 'a' + a); by setting sufficiently large number of max frame to be allowed which can be done via ctor of scheduler as well. |
Obviously this seems bit unergonomic, maybe revising interface bit more strictly to give notion to users would be better like
or vice versa. (or simply set default to positive infinity?) |
Why not? =) |
: Maybe, maybe not - I'm just not 100% sure if there's reasonable background history of choosing specific number as max frames. I'll leave this issue opened for further discussion. |
This is a bug. The TestScheduler should be limited to a specific window of time.. but the VirtualTimeScheduler should not. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Trying to implement immediate subscription result using VirtualTimeScheduler:
RxJS version:
5.0.0.beta.11
Code to reproduce:
Expected behavior:
Probably should be (this is the output without using virtual scheduler):
b0
b1
b2
a0
b3
b4
b5
b6
a1
b7
Actual behavior:
Actual output:
b0
b1
b2
Additional information:
Can be tried here
http://www.webpackbin.com/4k5VDUM5Z
The text was updated successfully, but these errors were encountered: