FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: fix wording in napi_async_init by tniessen · Pull Request #49180 · nodejs/node · GitHub

/ node Public

doc: fix wording in napi_async_init - #49180

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:doc-node-api-poor-result
Aug 17, 2023
Merged

doc: fix wording in napi_async_init#49180
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:doc-node-api-poor-result

Conversation

Copy link
Copy Markdown
Member

Even after reading through #32930, I am not quite sure what this was supposed to say, so please feel free to suggest alternatives. cc @legendecas @mhdawson

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/node-api

nodejs-github-bot added doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API. labels Aug 15, 2023

legendecas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The grammatical fix is LGTM.

Comment thread doc/api/n-api.md
In order to retain ABI compatibility with previous versions, passing `NULL`
for `async_resource` does not result in an error. However, this is not
recommended as this will result poor results with `async_hooks`
recommended as this will result in undesirable behavior with `async_hooks`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I found that in #32930, NULL is coerced to a newly created strong-referenced object to avoid breaking async_hooks.executionAsyncResource(). So it is not breaking async_hooks.executionAsyncResource() and AsyncLocalStorage, with the reason mentioned in the paragraph above.

As async_hooks.executionAsyncResource() is guaranteed to return a non-null object, it might be sufficient to state it is undefined behavior if the async_resource is NULL with the semantic conflicts.

mhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 17, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 17, 2023
nodejs-github-bot merged commit c4bbf0a into nodejs:main Aug 17, 2023

Copy link
Copy Markdown
Collaborator

Landed in c4bbf0a

UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
Refs: #32930
PR-URL: #49180
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon mentioned this pull request Sep 10, 2023
targos pushed a commit that referenced this pull request Nov 27, 2023
Refs: #32930
PR-URL: #49180
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Refs: nodejs/node#32930
PR-URL: nodejs/node#49180
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Refs: nodejs/node#32930
PR-URL: nodejs/node#49180
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL