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 authored and targos committed May 14, 2019
1 parent 8a96182 commit 7923b4a
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 7923b4a

Please sign in to comment.