Commit e1e1200
doc: clarify cjs/esm diff in
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>queueMicrotask() vs process.nextTick()
1 parent 57a7b93 commit e1e1200
1 file changed
+22
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3006 | 3006 | | |
3007 | 3007 | | |
3008 | 3008 | | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
3013 | 3014 | | |
3014 | 3015 | | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
3015 | 3021 | | |
3016 | 3022 | | |
3017 | 3023 | | |
3018 | | - | |
3019 | | - | |
3020 | | - | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
3021 | 3027 | | |
3022 | | - | |
3023 | | - | |
3024 | | - | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
3025 | 3031 | | |
3026 | 3032 | | |
3027 | 3033 | | |
3028 | 3034 | | |
3029 | 3035 | | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
3033 | 3039 | | |
3034 | | - | |
3035 | | - | |
3036 | | - | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
3037 | 3043 | | |
3038 | 3044 | | |
3039 | 3045 | | |
| |||
0 commit comments