Skip to content

docs(asynchronous-work): clarify setTimeout() scheduling in process.nextTick guide#98

Merged
avivkeller merged 5 commits into
nodejs:mainfrom
Akankshaaaa-01:docs/process-nexttick-wording
Jul 4, 2026
Merged

docs(asynchronous-work): clarify setTimeout() scheduling in process.nextTick guide#98
avivkeller merged 5 commits into
nodejs:mainfrom
Akankshaaaa-01:docs/process-nexttick-wording

Conversation

@Akankshaaaa-01

Copy link
Copy Markdown
Contributor

Summary

This change clarifies the wording describing setTimeout(() => {}, 0) in the Understanding process.nextTick() guide.

The previous wording referred to the callback executing "at the end of next tick", which may be interpreted as a specific event loop timing. The updated wording instead describes it as being scheduled for a future event loop iteration while preserving the beginner-friendly explanation.

No behavioral changes are introduced.

Signed-off-by: Akanksha <160621596+Akankshaaaa-01@users.noreply.github.com>
Clarify the wording describing the scheduling of setTimeout(() => {}, 0) relative to process.nextTick().

Signed-off-by: Akanksha <160621596+Akankshaaaa-01@users.noreply.github.com>
@Akankshaaaa-01 Akankshaaaa-01 requested a review from a team as a code owner June 26, 2026 17:53
@github-actions

Copy link
Copy Markdown

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/timers @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-learn Ready Ready Preview Jul 3, 2026 3:30am

Request Review

@cursor

cursor Bot commented Jun 26, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only wording change with no runtime or API impact.

Overview
Updates a single comparison sentence in Understanding process.nextTick() so setTimeout(() => {}, 0) is described as scheduling work for a future event loop iteration, instead of running “at the end of next tick.”

The revised text still contrasts that delay with process.nextTick(), which runs before the event loop continues, without changing the rest of the guide.

Reviewed by Cursor Bugbot for commit 3baae3f. Bugbot is set up for automated code reviews on this repo. Configure here.

@Akankshaaaa-01

Copy link
Copy Markdown
Contributor Author

@avivkeller Could you take a look at this PR when you have a chance? Happy to adjust the wording if needed, or close the PR if you think this change isn't necessary.

@avivkeller avivkeller merged commit 9026782 into nodejs:main Jul 4, 2026
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.

2 participants