From ae3243b9a48b909060a85f4f43b202985c515fdd 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 a96b1be67c5889..817dbcb2d52357 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -6070,6 +6070,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