Skip to content

Commit 50fb019

Browse files
mafintoshmcollina
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 1e4187f commit 50fb019

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
@@ -4755,6 +4755,9 @@ is sufficient and appropriate. Use of the `napi_make_callback` function
47554755
may be required when implementing custom async behavior that does not use
47564756
`napi_create_async_work`.
47574757

4758+
Any `process.nextTick`s or Promises scheduled on the microtask queue by
4759+
JavaScript during the callback are ran before returning back to C/C++.
4760+
47584761
### napi_open_callback_scope
47594762
<!-- YAML
47604763
added: v9.6.0

0 commit comments

Comments
 (0)