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
  • Loading branch information
Gabriel Schulhof committed May 13, 2019
1 parent 9c43e7a commit 2838ab4
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 2838ab4

Please sign in to comment.