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: improve the visibility of Worker threads cli options #31380

Closed

Conversation

HarshithaKP
Copy link
Member

fixes: #28518

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations. labels Jan 16, 2020
@HarshithaKP HarshithaKP changed the title doc: visibility of Worker threads cli options doc: improve the visibility of Worker threads cli options Jan 16, 2020
doc/api/cli.md Outdated
@@ -6,6 +6,9 @@
Node.js comes with a variety of CLI options. These options expose built-in
debugging, multiple ways to execute scripts, and other helpful runtime options.

Worker threads inherit non-process-specific options by default. Refer to
Copy link
Member

Choose a reason for hiding this comment

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

Is this a good place for this information? This is in a very prominent place in this document but it only applies to worker threads. This page is the documentation I would look at to figure out what CLI options I want to use. For what worker threads inherit, I would look in the worker_threads docs or maybe at process.argv and friends.

It took me a while to figure out what non-process-specific options means here, but I'm also not coming up with better terminology.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Trott ,thanks. Added in worker_threads.

doc/api/cli.md Outdated
@@ -6,6 +6,9 @@
Node.js comes with a variety of CLI options. These options expose built-in
debugging, multiple ways to execute scripts, and other helpful runtime options.

Worker threads inherit non-process-specific options by default. Refer to
[`Worker constructor options`][] to know how to customize worker thread options.
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to specifically mention the argv and execArgv options? Otherwise, the user may have to do a bit of looking for a needle in a haystack in the worker threads doc.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Trott, thanks. Mentioned argv and execArgv.

@Trott
Copy link
Member

Trott commented Jan 18, 2020

@nodejs/documentation @nodejs/workers

@HarshithaKP
Copy link
Member Author

I am ready to make changes as suggested by @Trott , but would like to get confirmation. I see @addaleax ’s thumbs up on the proposal; so shall I go ahead and make those changes, or wait to hear from the teams you have pinged? (I see 4 days have passed)

@addaleax
Copy link
Member

@HarshithaKP You can feel free to go ahead. Sometimes people try to ping relevant teams about PRs so that people who may want to weigh in have a chance to do so, but the pings themselves are mostly background noise.

@HarshithaKP
Copy link
Member Author

@addaleax and @Trott , I have addressed your suggestions and put it in doc/api/worker.md. Please have a look.

@@ -49,6 +49,10 @@ The above example spawns a Worker thread for each `parse()` call. In actual
practice, use a pool of Workers instead for these kinds of tasks. Otherwise, the
overhead of creating Workers would likely exceed their benefit.

Worker threads inherit non-process-specific options by default. Refer to
[`Worker constructor options`][] to know how to customize worker thread options,
specifically `argv` and `execArgv` options.
Copy link
Member

Choose a reason for hiding this comment

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

The two paragraphs here belong together; this should be added either above, or (preferably) below them.

Copy link
Member Author

Choose a reason for hiding this comment

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

@addaleax, Thanks. Put it in the suggested place.

@addaleax addaleax requested a review from Trott February 13, 2020 14:19
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 13, 2020
@addaleax
Copy link
Member

addaleax commented Mar 4, 2020

Landed in 37287d3

@addaleax addaleax closed this Mar 4, 2020
addaleax pushed a commit that referenced this pull request Mar 4, 2020
Fixes: #28518
PR-URL: #31380
Fixes: #28518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 4, 2020
Fixes: #28518
PR-URL: #31380
Fixes: #28518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 4, 2020
codebytere pushed a commit that referenced this pull request Mar 16, 2020
Fixes: #28518
PR-URL: #31380
Fixes: #28518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
Fixes: #28518
PR-URL: #31380
Fixes: #28518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebytere codebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 23, 2020
Fixes: #28518
PR-URL: #31380
Fixes: #28518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 30, 2020
Fixes: #28518
PR-URL: #31380
Fixes: #28518
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
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 pending requests for changes, and a CI started. cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workers: --require module injects module to worker thread
5 participants