Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update doc/api/n-api.md
  • Loading branch information
mhdawson authored May 4, 2020
commit 9d5c4d43b1c050176c9d866be4503b7a5de25cc1
5 changes: 5 additions & 0 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4674,6 +4674,11 @@ napi_status napi_async_init(napi_env env,
* `[in] env`: The environment that the API is invoked under.
* `[in] async_resource`: Object associated with the async work
that will be passed to possible `async_hooks` [`init` hooks][].
Comment thread
mhdawson marked this conversation as resolved.
In order to retain ABI compatibility with previous versions,
passing `NULL` for `async_resource` will not result in an error, however,
this will result incorrect operation of async hooks for the
napi_async_context created. Potential issues include
loss of async context when using the AsyncLocalStorage API.
* `[in] async_resource_name`: Identifier for the kind of resource
that is being provided for diagnostic information exposed by the
`async_hooks` API.
Expand Down