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: clarify use of process.env in worker threads on Windows #49008

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: clarify use of process.env in worker threads on Windows
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
  • Loading branch information
daeyeon committed Aug 3, 2023
commit 62171701f512c279e5181ed6051f5af3d1e31aa8
4 changes: 3 additions & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,9 @@ each [`Worker`][] thread has its own copy of `process.env`, based on its
parent thread's `process.env`, or whatever was specified as the `env` option
to the [`Worker`][] constructor. Changes to `process.env` will not be visible
across [`Worker`][] threads, and only the main thread can make changes that
are visible to the operating system or to native add-ons.
are visible to the operating system or to native add-ons. On Windows, a copy of
`process.env` on a [`Worker`][] instance operates in a case-sensitive manner
unlike the main thread.

## `process.execArgv`

Expand Down
3 changes: 2 additions & 1 deletion doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,8 @@ Notable differences inside a Worker environment are:
unless otherwise specified. Changes to one copy are not visible in other
threads, and are not visible to native add-ons (unless
[`worker.SHARE_ENV`][] is passed as the `env` option to the
[`Worker`][] constructor).
[`Worker`][] constructor). On Windows, unlike the main thread, a copy of the
environment variables operates in a case-sensitive manner.
* [`process.title`][] cannot be modified.
* Signals are not delivered through [`process.on('...')`][Signals events].
* Execution may stop at any point as a result of [`worker.terminate()`][]
Expand Down
Loading