Skip to content

doc: fix asyncLocalStorage.run() description#38023

Merged
aduh95 merged 1 commit intonodejs:masterfrom
PhakornKiong:doc/async-hook
Apr 3, 2021
Merged

doc: fix asyncLocalStorage.run() description#38023
aduh95 merged 1 commit intonodejs:masterfrom
PhakornKiong:doc/async-hook

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

Loading
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