-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: improve the visibility of Worker threads cli options #31380
Conversation
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
@nodejs/documentation @nodejs/workers |
@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. |
doc/api/worker_threads.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Landed in 37287d3 |
fixes: #28518
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes