-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: note synchronous part of child_process.spawn #21234
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,12 @@ without blocking the Node.js event loop. The [`child_process.spawnSync()`][] | |
function provides equivalent functionality in a synchronous manner that blocks | ||
the event loop until the spawned process either exits or is terminated. | ||
|
||
*Note*: On UNIX-like operating systems, the [`child_process.spawn()`][] method | ||
performs memory operations synchronously before decoupling the event loop | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be more specific and write "On UNIX-like operating systems" and tweak the wording to clarify that it's the underlying fork() system call that is responsible for copying memory, not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like "UNIX-like" (217acc4), but I don't think we need to go into detail on the root cause. The V8 link explains things. |
||
from the child. Applications with a large memory footprint may find frequent | ||
[`child_process.spawn()`][] calls to be a bottleneck. For more information, | ||
see [V8 issue 7381](https://bugs.chromium.org/p/v8/issues/detail?id=7381). | ||
|
||
For convenience, the `child_process` module provides a handful of synchronous | ||
and asynchronous alternatives to [`child_process.spawn()`][] and | ||
[`child_process.spawnSync()`][]. *Note that each of these alternatives are | ||
|
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.
Just a nit: The
*Note*:
part is unnecessary.