Skip to content

Commit

Permalink
doc: clarify operation of napi_cancel_async_work
Browse files Browse the repository at this point in the history
PR-URL: #12974
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
  • Loading branch information
mhdawson committed May 16, 2017
1 parent e600fbe commit 1b28022
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/api/n-api.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2931,11 +2931,12 @@ NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,


Returns `napi_ok` if the API succeeded. Returns `napi_ok` if the API succeeded.


This API cancels a previously allocated work, provided This API cancels queued work if it has not yet
it has not yet been queued for execution. After this function is called been started. If it has already started executing, it cannot be
cancelled and `napi_generic_failure` will be returned. If successful,
the `complete` callback will be invoked with a status value of the `complete` callback will be invoked with a status value of
`napi_cancelled`. The work should not be deleted before the `complete` `napi_cancelled`. The work should not be deleted before the `complete`
callback invocation, even when it was cancelled. callback invocation, even if it has been successfully cancelled.




[Aynchronous Operations]: #n_api_asynchronous_operations [Aynchronous Operations]: #n_api_asynchronous_operations
Expand Down

0 comments on commit 1b28022

Please sign in to comment.