docs(asynchronous-work): clarify setImmediate() behavior#97
docs(asynchronous-work): clarify setImmediate() behavior#97raj-aayush01 wants to merge 1 commit into
Conversation
Clarify that setImmediate() is not generally equivalent to setTimeout(() => {}, 0).
Signed-off-by: Aayush Raj <aayushraj065@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview The text now states that Reviewed by Cursor Bugbot for commit d2d3e27. Bugbot is set up for automated code reviews on this repo. Configure here. |
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/timers Please review the changes when you have a chance. Thank you! 🙏 |
The documentation currently states that
setImmediate()is equivalent tosetTimeout(() => {}, 0).This change clarifies that they are not generally equivalent because their callbacks execute in different phases of the event loop, and their execution order depends on the execution context.