Skip to content

Commit a03d2b5

Browse files
mafintoshcodebytere
authored andcommitted
n-api: document nextTick timing in callbacks
PR-URL: #33804 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 4383627 commit a03d2b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/n-api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4751,6 +4751,9 @@ is sufficient and appropriate. Use of the `napi_make_callback` function
47514751
may be required when implementing custom async behavior that does not use
47524752
`napi_create_async_work`.
47534753

4754+
Any `process.nextTick`s or Promises scheduled on the microtask queue by
4755+
JavaScript during the callback are ran before returning back to C/C++.
4756+
47544757
### napi_open_callback_scope
47554758
<!-- YAML
47564759
added: v9.6.0

0 commit comments

Comments
 (0)