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: add AsyncResource + Worker pool example #31601

Closed
wants to merge 3 commits into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Feb 1, 2020

Use Worker thread pools as an example of how AsyncResource
can be used to track async state across callbacks.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 1, 2020
@addaleax addaleax added async_hooks Issues and PRs related to the async hooks subsystem. worker Issues and PRs related to Worker support. labels Feb 1, 2020
@addaleax
Copy link
Member Author

addaleax commented Feb 1, 2020

@nodejs/async_hooks

doc/api/async_hooks.md Show resolved Hide resolved
@pioardi
Copy link

pioardi commented Feb 2, 2020

Hi @addaleax , @gireeshpunathil ,
I reviewed the PR , the example is clear and contains a lot of useful info .

Thanks !!!

doc/api/worker_threads.md Outdated Show resolved Hide resolved
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

LGTM with or without my suggestion.

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 4, 2020
Co-Authored-By: Rich Trott <rtrott@gmail.com>
@addaleax
Copy link
Member Author

addaleax commented Feb 5, 2020

Landed in 6a6279e

@addaleax addaleax closed this Feb 5, 2020
@addaleax addaleax deleted the async-resource-example branch February 5, 2020 14:41
addaleax added a commit that referenced this pull request Feb 5, 2020
Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.

PR-URL: #31601
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
codebytere pushed a commit that referenced this pull request Feb 17, 2020
Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.

PR-URL: #31601
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
@codebytere codebytere mentioned this pull request Feb 17, 2020
@codebytere
Copy link
Member

Blocked on #32131

@addaleax
Copy link
Member Author

@codebytere … why? This is about AsyncResource, not executionAsyncResource, and should be able to land independently. If there are conflicts, I can backport manually, of course

@codebytere
Copy link
Member

@addaleax my fault, wrong label! you're right. This is a conflict but it just needs a manual backport.

@addaleax
Copy link
Member Author

@codebytere It backports cleanly for me… I can just push to v12.x-staging if you like?

codebytere pushed a commit that referenced this pull request Mar 17, 2020
Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.

PR-URL: #31601
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
@codebytere codebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 23, 2020
Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.

PR-URL: #31601
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 30, 2020
Use Worker thread pools as an example of how `AsyncResource`
can be used to track async state across callbacks.

PR-URL: #31601
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
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. worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants