Skip to content
Permalink
Browse files
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>
  • Loading branch information
mafintosh authored and codebytere committed Jun 18, 2020
1 parent 1d918b6 commit e924439d96490b0f80e1a8b0c25d9652eb4ad267
Showing with 3 additions and 0 deletions.
  1. +3 −0 doc/api/n-api.md
@@ -4751,6 +4751,9 @@ is sufficient and appropriate. Use of the `napi_make_callback` function
may be required when implementing custom async behavior that does not use
`napi_create_async_work`.

Any `process.nextTick`s or Promises scheduled on the microtask queue by
JavaScript during the callback are ran before returning back to C/C++.

### napi_open_callback_scope
<!-- YAML
added: v9.6.0

0 comments on commit e924439

Please sign in to comment.