Skip to content

doc: clarify cjs and esm scheduling difference between queueMicrotask() and process.nextTick()#56659

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
dario-piotrowicz:dario/45048/process-next-tick-example
Jan 21, 2025
Merged

doc: clarify cjs and esm scheduling difference between queueMicrotask() and process.nextTick()#56659
nodejs-github-bot merged 1 commit intonodejs:mainfrom
dario-piotrowicz:dario/45048/process-next-tick-example

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

@dario-piotrowicz dario-piotrowicz commented Jan 19, 2025

the section comparing queueMicrotask() and process.nextTick() doesn't address the different scheduling behavior that the two functions have in cjs and esm modules, the section's introductory mjs example also provides an incorrect output, the changes here address such by explaining the difference between the two module types and updating the example accordingly

Fixes: #45048

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong example

5 participants