Skip to content

Commit 608cc05

Browse files
mhdawsontargos
authored andcommitted
doc: recommend not using libuv node-api function
- update documentation recommend not using the napi_get_uv_event_loop function. It should not be need for most if not all uses cases now that the API is more complete. Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #53521 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent d5c380b commit 608cc05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/api/n-api.md

+6
Original file line numberDiff line numberDiff line change
@@ -6241,6 +6241,12 @@ NAPI_EXTERN napi_status napi_get_uv_event_loop(node_api_nogc_env env,
62416241
* `[in] env`: The environment that the API is invoked under.
62426242
* `[out] loop`: The current libuv loop instance.
62436243

6244+
Note: While libuv has been relatively stable over time, it does
6245+
not provide an ABI stability guarantee. Use of this function should be avoided.
6246+
Its use may result in an addon that does not work across Node.js versions.
6247+
[asynchronous-thread-safe-function-calls](https://nodejs.org/docs/latest/api/n-api.html#asynchronous-thread-safe-function-calls)
6248+
are an alternative for many use cases.
6249+
62446250
## Asynchronous thread-safe function calls
62456251

62466252
JavaScript functions can normally only be called from a native addon's main

0 commit comments

Comments
 (0)