Skip to content

Commit 7923b4a

Browse files
Gabriel Schulhoftargos
Gabriel Schulhof
authored andcommitted
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: #27217 PR-URL: #27582 Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 8a96182 commit 7923b4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/n-api.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4060,7 +4060,8 @@ napi_status napi_queue_async_work(napi_env env,
40604060
Returns `napi_ok` if the API succeeded.
40614061

40624062
This API requests that the previously allocated work be scheduled
4063-
for execution.
4063+
for execution. Once it returns successfully, this API must not be called again
4064+
with the same `napi_async_work` item or the result will be undefined.
40644065

40654066
### napi_cancel_async_work
40664067
<!-- YAML

0 commit comments

Comments
 (0)