Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v10.7.0 proposal #21851
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
Uh oh!
There was an error while loading. Please reload this page.
v10.7.0 proposal #21851
Changes from 1 commit
9cd5c0e96dae833a627c8221c8bded774b7fe9888a25dac956f8ebc04fa715047b10e3f3c397cceec23ec88af23021dd54cec166ea5233c7f7aa22a9776f1cc8d5bab04eed23214c608034fe1924f649c97167931044bafdc84858109c599b8ba003cd77d87194d195eda7fff11e9b4e92d79216e1917a51db88bb75800607160cddae7130122ae2425fef3dcd6601b577d24bf386c0ac4d7413d063056692009127707784f3bbfab9bbbbe48b16aa07cce8827d17d43096ee5e030dd7c26ba083fffc7e3d93273bba500d4b613d3c02fb88f46536b712809eada3f347ab6efd42d7539b229129ae5d56515026510de0f89cb69811aa5994f961f6e8600349ab0943a6a68b7ddf1b18ba4433ecba09bdb5466601f51d613d4ed5d1ad33281bca8c960678313d0298299d42dbde355c5e35121278a9a71867352b7210f937451dfebf1019c2d238ef5832ad163a2edb594e60ce873cafd82a0862c8c97ffb53b587a6bb2b5a0b3c80cb338ff5174a9db6b7258367908e94ed4bf3eef975e581390c576f1ead9825c70108ff62922028506631a991bb95File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
This patch split part of the bootstrappers into three files: - `lib/internal/process/main_thread_only.js`: contains bootstrappers that can only be run in the main thread, including - `setupStdio` for the main thread that sets up `process.stdin`, `process.stdout`, `process.error` that may interact with external resources, e.g. TTY/File/Pipe/TCP sockets - `setupProcessMethods` that setup methods changing process-global states, e.g. `process.chdir`, `process.umask`, `process.setuid` - `setupSignalHandlers` - `setupChildProcessIpcChannel` that setup `process.send` for child processes. - `lib/internal/process/worker_thread_only.js`: contains bootstrappers that can only be run in the worker threads, including - `setupStdio` for the worker thread that are streams to be manipulated or piped to the parent thread - `lib/internal/process/per_thread.js`: contains bootstrappers that can be run in all threads, including: - `setupAssert` for `process.assert` - `setupCpuUsage` for `process.cpuUsage` - `setupHrtime` for `process.hrtime` and `process.hrtime.bigint` - `setupMemoryUsage` for `process.memoryUsage` - `setupConfig` for `process.config` - `setupKillAndExit` for `process.kill` and `process.exit` - `setupRawDebug` for `process._rawDebug` - `setupUncaughtExceptionCapture` for `process.setUncaughtExceptionCaptureCallback` and `process.hasUncaughtExceptionCaptureCallback` Hopefully in the future we can sort more bootstrappers in `boostrap/node.js` into these three files and further group them into functions that can be run before creating the snapshot / after loading the snapshot. This patch also moves most of the `isMainThread` conditionals into the main bootstrapper instead of letting them scattered around special-casing different implementations. PR-URL: #21378 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Backport-PR-URL: #21866 Reviewed-By: Michaël Zasso <targos@protonmail.com>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.