doc: add additional info on TSFN dispatch

Refs: https://github.com/nodejs/node/issues/48356

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/48367
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Michael Dawson authored and Ruy Adorno committed 2023-09-12 10:58:07 -04:00
1 parent 5cc6eee30d
commit 2a561aefe2
1 file changed
+5
+5
View File
@@ -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