Skip to content

doc: clarify options for single customization hooks thread - #53006

Closed
dygabo wants to merge 2 commits into
nodejs:mainfrom
dygabo:doc-update-envargs-worker
Closed

dygabo wants to merge 2 commits into
nodejs:mainfrom
dygabo:doc-update-envargs-worker

Conversation

@dygabo

@dygabo dygabo commented May 15, 2024 •

Copy link
Copy Markdown
Member

triggered by comment on #47747.
This PR adds clarification on single customization chain thread that were introduced with #52706

@nodejs/loaders

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to Node.js documentation. label May 15, 2024

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

Thanks for this!

@Flarna Flarna added module Issues and PRs related to the module subsystem. worker Issues and PRs related to the worker_threads module and Worker API. loaders Issues and PRs related to ES module loaders. labels May 15, 2024
Comment thread doc/api/cli.md Outdated
Comment on lines 901 to 902

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.

To me this reads as “the loader won’t apply to worker threads,” but what I assume you mean is “you don’t need to pass this argument when spawning a worker thread, as it will inherit from the main thread.” I’m not sure we need this addition at all; the other addition in module.md might be enough.

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.

indeed that was intended. What do you think about: "This option
has no effect on worker threads. Worker threads inherit the customization hooks chain configured on main thread."

I can also remove this addition. The idea for adding it here as well was to have all relevant entry points in the documentation covered. To make it clear so that the user expectation is correct.

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.