Skip to content

Commit

Permalink
doc: add call-once note to napi_queue_async_work
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Gabriel Schulhof committed May 13, 2019
1 parent 9c5ded3 commit 6be5c3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6be5c3b

Please sign in to comment.