worker: enable passing command line flags#25467
Closed
yaelhe wants to merge 3 commits intonodejs:masterfrom
Closed
worker: enable passing command line flags#25467yaelhe wants to merge 3 commits intonodejs:masterfrom
yaelhe wants to merge 3 commits intonodejs:masterfrom
Conversation
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'],
});
```
Member
|
@nodejs/workers |
Contributor
Author
|
Updated with @addaleax 's suggestions. |
Member
|
CI: https://ci.nodejs.org/job/node-test-pull-request/20080/ (:heavy_check_mark:) |
benjamingr
approved these changes
Jan 13, 2019
jdalton
reviewed
Jan 13, 2019
joyeecheung
approved these changes
Jan 13, 2019
Contributor
|
Landed in 01cd219. |
danbev
pushed a commit
that referenced
this pull request
Jan 18, 2019
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>
targos
pushed a commit
that referenced
this pull request
Jan 24, 2019
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>
Merged
MylesBorins
added a commit
that referenced
this pull request
Jan 24, 2019
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
Jan 25, 2019
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes