Skip to content

Commit

Permalink
n-api: document nextTick timing in callbacks
Browse files Browse the repository at this point in the history
PR-URL: #33804
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
mafintosh authored and codebytere committed Jul 10, 2020
1 parent ba813dd commit 2e97d82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4728,6 +4728,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
Expand Down

0 comments on commit 2e97d82

Please sign in to comment.