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

doc: improve worker_threads documentation by addaleax · Pull Request #26110 · nodejs/node · GitHub

/ node Public

doc: improve worker_threads documentation - #26110

Closed
addaleax wants to merge 4 commits into
nodejs:masterfrom
addaleax:worker-doc
Closed

doc: improve worker_threads documentation#26110
addaleax wants to merge 4 commits into
nodejs:masterfrom
addaleax:worker-doc

Conversation

Copy link
Copy Markdown
Member

This adds a few examples and clarifications.

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

This adds a few examples and clarifications.

Copy link
Copy Markdown
Collaborator

nodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 14, 2019
addaleax added the worker Issues and PRs related to Worker support. label Feb 14, 2019
Comment thread doc/api/worker_threads.md Outdated
Comment thread doc/api/worker_threads.md
This method can be called when no further communication will happen over this
`MessagePort`.

The [`'close'` event][] will be emitted on both `MessagePort` instances that

Trott Feb 14, 2019
edited
Loading

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

Might be I'm over-reacting to passive voice, but perhaps this?:

Both `MessagePort` instances that are part of the channel will emit a [`'close'` event][].

Copy link
Copy Markdown
Member Author

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 have to admit that active voice sounds a bit weird to me when referring to events :)

Trott 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

Left two completely-optional totally-ignorable comment/suggestions, but LGTM as-is.

Trott commented Feb 15, 2019

Copy link
Copy Markdown
Member

Trott added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 15, 2019
Comment thread doc/api/worker_threads.md
@@ -91,6 +120,16 @@ added: v10.5.0
An arbitrary JavaScript value that contains a clone of the data passed

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

It might be good to include more of a description of what "clone" here means in general. I know there are a few bits and pieces of an explanation through the doc, but coalescing those into a single section with some information on what types of values cannot be cloned, would be good.

Copy link
Copy Markdown
Member Author

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

@jasnell How does 919fd07 sound to you?

Comment thread doc/api/worker_threads.md
The `worker_threads` module enables the use of threads with message channels
between them. To access it:
The `worker_threads` module enables the use of threads that execute JS code
in parallel. To access it:

Copy link
Copy Markdown
Contributor

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

Maybe something more like "that allow parallel execution contexts for JS code"?

Copy link
Copy Markdown
Member Author

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

@Fishrock123 I’m not sure … “execution context” sounds like a very generic thing?

vsemozhetbyt left a comment

Copy link
Copy Markdown
Contributor

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

With nits)

Comment thread doc/api/worker_threads.md Outdated
Comment thread doc/api/worker_threads.md Outdated
Comment thread doc/api/worker_threads.md Outdated
Comment thread doc/api/worker_threads.md Outdated
Comment thread doc/api/worker_threads.md Outdated

Copy link
Copy Markdown
Member Author

@vsemozhetbyt Done!

Lite CI: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/2642/

Copy link
Copy Markdown
Member Author

Landed in 70a500f

addaleax closed this Feb 17, 2019
addaleax deleted the worker-doc branch February 17, 2019 18:00
addaleax added a commit that referenced this pull request Feb 17, 2019
This adds a few examples and clarifications.

PR-URL: #26110
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
addaleax added a commit that referenced this pull request Feb 17, 2019
This adds a few examples and clarifications.

PR-URL: #26110
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
BridgeAR mentioned this pull request Feb 26, 2019
rvagg pushed a commit that referenced this pull request Feb 28, 2019
This adds a few examples and clarifications.

PR-URL: #26110
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@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

author ready PRs that have at least one approval, no outstanding review comments, 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.

8 participants


Back | FazBrowse Home | New Git URL