Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix asyncLocalStorage.run() description #38023

Merged
merged 1 commit into from Apr 3, 2021

Conversation

PhakornKiong
Copy link
Contributor

From the docs here

This methods runs a function synchronously outside of a context and return its return value. The store is not accessible within the callback function or the asynchronous operations created within the callback.

The description that store is not available when asynchronous operation is created within the callback is not accurate.

This PR add a setTimeout() within the example and update the description.

Fixes: #38022

@nodejs-github-bot nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. doc Issues and PRs related to the documentations. labels Apr 1, 2021
Copy link
Member

@Ayase-252 Ayase-252 left a comment

Choose a reason for hiding this comment

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

Small typo, and make linter happy 👍

doc/api/async_hooks.md Outdated Show resolved Hide resolved
@Flarna Flarna added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 2, 2021
The description that store is not available
when asynchronous operation is created within
the callback is not accurate

Fixes: nodejs#38022

PR-URL: nodejs#38023
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@aduh95
Copy link
Contributor

aduh95 commented Apr 3, 2021

Landed in a44392d

@aduh95 aduh95 merged commit a44392d into nodejs:master Apr 3, 2021
MylesBorins pushed a commit that referenced this pull request Apr 4, 2021
The description that store is not available
when asynchronous operation is created within
the callback is not accurate

Fixes: #38022

PR-URL: #38023
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Apr 4, 2021
MylesBorins pushed a commit that referenced this pull request Apr 5, 2021
The description that store is not available
when asynchronous operation is created within
the callback is not accurate

Fixes: #38022

PR-URL: #38023
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
targos pushed a commit that referenced this pull request May 1, 2021
The description that store is not available
when asynchronous operation is created within
the callback is not accurate

Fixes: #38022

PR-URL: #38023
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@danielleadams danielleadams mentioned this pull request May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async_hooks Issues and PRs related to the async hooks subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: inconsistent asnycLocalStorage.run() description
6 participants