mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -6241,6 +6241,12 @@ NAPI_EXTERN napi_status napi_get_uv_event_loop(node_api_nogc_env env,
|
||||
* `[in] env`: The environment that the API is invoked under.
|
||||
* `[out] loop`: The current libuv loop instance.
|
||||
|
||||
Note: While libuv has been relatively stable over time, it does
|
||||
not provide an ABI stability guarantee. Use of this function should be avoided.
|
||||
Its use may result in an addon that does not work across Node.js versions.
|
||||
[asynchronous-thread-safe-function-calls](https://nodejs.org/docs/latest/api/n-api.html#asynchronous-thread-safe-function-calls)
|
||||
are an alternative for many use cases.
|
||||
|
||||
## Asynchronous thread-safe function calls
|
||||
|
||||
JavaScript functions can normally only be called from a native addon's main
|
||||
|
||||
Reference in New Issue
Block a user