doc: update napi_async_init documentation by mhdawson · Pull Request #33181 · nodejs/node

@mhdawson

Fixes: nodejs#33153

Change documentation to make async_resource required
as opposed to optional in napi-async_init.

Changes over time mean this parameter is required for
proper operation of async hooks (which are still experimental).
This changes the documentation to document what
callers should do. We are doing this only in the doc
in order to avoid a breaking change in N-API. We could
create a new version of the method for which the
parametrer is enforced as mandatory but we should only
do that once async hooks is no longer experimental. In
that case we could deprecate (but not remove this version
of the method).

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

@nodejs-github-bot added doc

Issues and PRs related to the documentations.

node-api

Issues and PRs related to the Node-API.

labels

Apr 30, 2020

legendecas

@mhdawson @legendecas

Co-authored-by: legendecas <legendecas@gmail.com>

mhdawson

@mhdawson

mhdawson

@mhdawson

@mhdawson mhdawson marked this pull request as ready for review

May 4, 2020 15:51

legendecas

mhdawson added a commit that referenced this pull request

May 6, 2020
Fixes: #33153

Change documentation to make async_resource required
as opposed to optional in napi-async_init.

Changes over time mean this parameter is required for
proper operation of async hooks (which are still experimental).
This changes the documentation to document what
callers should do. We are doing this only in the doc
in order to avoid a breaking change in N-API. We could
create a new version of the method for which the
parametrer is enforced as mandatory but we should only
do that once async hooks is no longer experimental. In
that case we could deprecate (but not remove this version
of the method).

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

PR-URL: #33181
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

codebytere pushed a commit that referenced this pull request

May 7, 2020
Fixes: #33153

Change documentation to make async_resource required
as opposed to optional in napi-async_init.

Changes over time mean this parameter is required for
proper operation of async hooks (which are still experimental).
This changes the documentation to document what
callers should do. We are doing this only in the doc
in order to avoid a breaking change in N-API. We could
create a new version of the method for which the
parametrer is enforced as mandatory but we should only
do that once async hooks is no longer experimental. In
that case we could deprecate (but not remove this version
of the method).

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

PR-URL: #33181
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

codebytere pushed a commit that referenced this pull request

Jun 7, 2020
Fixes: #33153

Change documentation to make async_resource required
as opposed to optional in napi-async_init.

Changes over time mean this parameter is required for
proper operation of async hooks (which are still experimental).
This changes the documentation to document what
callers should do. We are doing this only in the doc
in order to avoid a breaking change in N-API. We could
create a new version of the method for which the
parametrer is enforced as mandatory but we should only
do that once async hooks is no longer experimental. In
that case we could deprecate (but not remove this version
of the method).

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

PR-URL: #33181
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

This was referenced

Jan 31, 2023