-
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
Observable.interval(0) locks up browser incorrectly #1339
Comments
Guessing it has something to do with using Without knowing enough about why each scheduler exists, it seems to me like |
@jayphelps |
Oh yeah. Derp. If your schedule an infinite loop of micro tasks, everything you schedule has to run before anything else on the event loop. As such it'll block for anything you're not scheduling as a micro task. LOL. Makes total sense. |
This should probably default to a different scheduler. Leaving it as a bug for now. |
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. |
This code:
Should not lock up the browser, because using a
setInterval(func, 0)
won't, as long as the func isn't crazy.If you change it to
Observable.interval(1)
, it works as expected, so @Blesh thinks it probably is trying to be overly smart and instead do a regularfor
loop or equivalent blocking operation.https://jsbin.com/qiperi/edit?js,console,output (example here uses
.interval(1)
to not lock up your browser immediately, but if you change it to0
it will lock up)The text was updated successfully, but these errors were encountered: