Skip to content

doc: add AsyncResource + Worker pool example - #31601

Closed
addaleax wants to merge 3 commits into
nodejs:masterfrom
addaleax:async-resource-example
Closed

doc: add AsyncResource + Worker pool example#31601
addaleax wants to merge 3 commits into
nodejs:masterfrom
addaleax:async-resource-example

Conversation

@addaleax

Copy link
Copy Markdown
Member

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-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 1, 2020
@addaleaxaddaleax 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
Copy Markdown
MemberAuthor

@nodejs/async_hooks

Comment threaddoc/api/async_hooks.md
@pioardi

Copy link
Copy Markdown

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

Thanks !!!

Comment threaddoc/api/worker_threads.md Outdated

@TrottTrott 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.

LGTM with or without my suggestion.

@addaleaxaddaleax 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
Copy Markdown
MemberAuthor

Landed in 6a6279e

@addaleaxaddaleax 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>
@codebyterecodebytere mentioned this pull request Feb 17, 2020
@codebytere

Copy link
Copy Markdown
Member

Blocked on #32131

@addaleax

Copy link
Copy Markdown
MemberAuthor

@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
Copy Markdown
Member

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

@addaleax

Copy link
Copy Markdown
MemberAuthor

@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>
@codebyterecodebytere 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooksIssues and PRs related to the async hooks subsystem.author readyPRs that have at least one approval, no pending requests for changes, and a CI started.docIssues and PRs related to the documentations.workerIssues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@addaleax@pioardi@codebytere@jasnell@Trott@antsmartian@gireeshpunathil@legendecas@MylesBorins@nodejs-github-bot