doc: clarify cjs/esm diff in `queueMicrotask()` vs `process.nextTick()` · nodejs/node@e1e1200 · GitHub
Skip to content

Commit e1e1200

Browse files
dario-piotrowiczaduh95
authored andcommitted
doc: clarify cjs/esm diff in queueMicrotask() vs process.nextTick()
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 PR-URL: #56659 Fixes: #45048 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 57a7b93 commit e1e1200

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

doc/api/process.md

Lines changed: 22 additions & 16 deletions

0 commit comments

Comments
 (0)