From e848bb4c1dc9b71837884c3ab42b07ea9e777029 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Tue, 9 Jun 2020 10:53:47 +0200 Subject: [PATCH] n-api: document nextTick timing in callbacks --- doc/api/n-api.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 58e79c6e9933de..ae0b0b09d06926 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -4755,6 +4755,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