Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lionel-rowe
Copy link
Contributor

Fixes #80, which is still an issue in environments with process.nextTick but no setImmediate (e.g. browser with polyfilled Node process).

New order of preference as follows:

  1. setImmediate
- 2. process.nextTick
+ 2. scheduler.postTask
  3. setTimeout

scheduler.postTask seems to be the standardized browser API with the closest performance characteristics and ergonomics to setImmediate, but it's not yet implemented in all browsers (notably Safari support is still missing).

@dcodeIO dcodeIO merged commit 1211e9a into dcodeIO:main Nov 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

process.nextTick still starves the event loop

2 participants