Skip to content

Support a runImmediate flag to avoid processing delays - #3053

Open
turt2live wants to merge 1 commit into
request:masterfrom
turt2live:travis/defer-web
Open

turt2live wants to merge 1 commit into
request:masterfrom
turt2live:travis/defer-web

Conversation

@turt2live

@turt2live turt2live commented Oct 30, 2018 •

Copy link
Copy Markdown

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
Copy Markdown
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

reconbot commented Dec 13, 2018 •

Copy link
Copy Markdown
Contributor

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.

2 participants