worker: enable passing command line flags by yaelhe · Pull Request #25467 · nodejs/node
This PR adds the ability to provide Workers with their own
execArgv flags in replacement of the main thread's execArgv. Only
per-Isolate/per-Environment options are allowed. Per-Process options
and V8 flags are not allowed. Passing an empty execArgv array will
reset per-Isolate and per-Environment options of the Worker to their
defaults. If execArgv option is not passed, the Worker will get
the same flags as the main thread.
Usage example:
```
const worker = new Worker(__filename, {
execArgv: ['--trace-warnings'],
});
```
added
c++
labels
addaleax
added
the
author ready
label
danbev pushed a commit that referenced this pull request
This PR adds the ability to provide Workers with their own
execArgv flags in replacement of the main thread's execArgv. Only
per-Isolate/per-Environment options are allowed. Per-Process options
and V8 flags are not allowed. Passing an empty execArgv array will
reset per-Isolate and per-Environment options of the Worker to their
defaults. If execArgv option is not passed, the Worker will get
the same flags as the main thread.
Usage example:
```
const worker = new Worker(__filename, {
execArgv: ['--trace-warnings'],
});
```
PR-URL: #25467
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
addaleax
added
the
semver-minor
label
targos pushed a commit that referenced this pull request
This PR adds the ability to provide Workers with their own
execArgv flags in replacement of the main thread's execArgv. Only
per-Isolate/per-Environment options are allowed. Per-Process options
and V8 flags are not allowed. Passing an empty execArgv array will
reset per-Isolate and per-Environment options of the Worker to their
defaults. If execArgv option is not passed, the Worker will get
the same flags as the main thread.
Usage example:
```
const worker = new Worker(__filename, {
execArgv: ['--trace-warnings'],
});
```
PR-URL: #25467
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins added a commit that referenced this pull request
Notable Changes:
* events:
* For unhandled `error` events with an argument that is not an
`Error` object, the resulting exeption will have more information
about the argument.
#25621
* child_process:
* When the `maxBuffer` option is passed, `stdout` and `stderr` will
be truncated rather than unavailable in case of an error.
#24951
* policy:
* Experimental support for module integrity checks through a manifest
file is implemented now.
#23834
* n-api:
* The `napi_threadsafe_function` feature is now stable.
#25556
* report:
* An experimental diagnostic API for capturing process state is
available as `process.report` and through command line flags.
#22712
* tls:
* `tls.connect()` takes a `timeout` option analogous to the
`net.connect()` one.
#25517
* worker:
* `process.umask()` is available as a read-only function inside Worker
threads now.
#25526
* An `execArgv` option that supports a subset of Node.js command line
options is supported now.
#25467
PR-URL: #25687
MylesBorins added a commit that referenced this pull request
Notable Changes:
* events:
* For unhandled `error` events with an argument that is not an
`Error` object, the resulting exeption will have more information
about the argument.
#25621
* child_process:
* When the `maxBuffer` option is passed, `stdout` and `stderr` will
be truncated rather than unavailable in case of an error.
#24951
* policy:
* Experimental support for module integrity checks through a manifest
file is implemented now.
#23834
* n-api:
* The `napi_threadsafe_function` feature is now stable.
#25556
* report:
* An experimental diagnostic API for capturing process state is
available as `process.report` and through command line flags.
#22712
* tls:
* `tls.connect()` takes a `timeout` option analogous to the
`net.connect()` one.
#25517
* worker:
* `process.umask()` is available as a read-only function inside Worker
threads now.
#25526
* An `execArgv` option that supports a subset of Node.js command line
options is supported now.
#25467
PR-URL: #25687
meixg
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters