From a8db3319ec5bd4ce797da3cba9810169c4190f3f Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 6 Jun 2023 15:18:30 -0400 Subject: [PATCH] doc: add additional info on TSFN dispatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/issues/48356 Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/48367 Reviewed-By: Tobias Nießen Reviewed-By: Chengzhong Wu --- doc/api/n-api.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 6f2b791c9257ed..ac3bd95e7c5f8c 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -6066,6 +6066,11 @@ Node.js process exits while there is a thread-safe function still active. It is not necessary to call into JavaScript via `napi_make_callback()` because Node-API runs `call_js_cb` in a context appropriate for callbacks. +Zero or more queued items may be invoked in each tick of the event loop. +Applications should not depend on a specific behavior other than progress in +invoking callbacks will be made and events will be invoked +as time moves forward. + ### Reference counting of thread-safe functions Threads can be added to and removed from a `napi_threadsafe_function` object