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 <[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]>
  • 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.