doc: add call-once note to napi_queue_async_work

Add note to `napi_queue_async_work()` indicating that, upon successful
return, it must not be called again with the same work item.

Fixes: https://github.com/nodejs/node/issues/27217
PR-URL: https://github.com/nodejs/node/pull/27582
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Gabriel Schulhof 2019-05-06 07:56:58 -07:00
parent 9c5ded3189
commit 6be5c3bdae

View File

@ -4060,7 +4060,8 @@ napi_status napi_queue_async_work(napi_env env,
Returns `napi_ok` if the API succeeded.
This API requests that the previously allocated work be scheduled
for execution.
for execution. Once it returns successfully, this API must not be called again
with the same `napi_async_work` item or the result will be undefined.
### napi_cancel_async_work
<!-- YAML