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

Support a runImmediate flag to avoid processing delays #3053

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

turt2live
Copy link

@turt2live turt2live commented Oct 30, 2018

PR Checklist:

  • I have run npm test locally and all tests are passing. (I'm relying on the CI for this, as the tests don't run on my environment to begin with)
  • I have added/updated tests for any new behavior.
  • If this is a significant change, an issue has already been created where the problem / solution was discussed: N/A

PR Description

This is particularly useful in web environments where setImmediate() may be temporarily paused by the browser. When a high resource usage tab is put in the background, browsers often pause timer usage until the app is foregrounded again. For some web applications, performing background network requests even when backgrounded itself is useful and may wish to avoid use of setImmediate, understanding the risk in potentially doing so.

@turt2live
Copy link
Author

Looks like the test failures are unrelated and also present on master.

This is particularly useful in web environments where setImmediate() may be temporarily paused by the browser. When a high resource usage tab is put in the background, browsers often pause timer usage until the app is foregrounded again. For some web applications, performing background network requests even when backgrounded itself is useful and may wish to avoid use of setImmediate, understanding the risk in potentially doing so.
@reconbot
Copy link
Contributor

reconbot commented Dec 13, 2018

I'm not sure we want to use setImmediate if that's the case. I think we need the defer in the init, but I'm not sure. What else could we use in the browser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants