-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.workerIssues and PRs related to Worker support.Issues and PRs related to Worker support.
Description
Is your feature request related to a problem? Please describe.
process.argv is commonly used in Node.js. Right now there is only execArgv for altering how node instance works, which will be filtered process.argv with these only Node.js understands.
Describe the solution you'd like
Add an option argv to Worker constructor's second argument.
new Worker(__filename, { argv: ['foo', 'bar'] })
if (!isMainThread) {
console.log(process.argv) // ['foo', 'bar']
}Describe alternatives you've considered
Just use option workerData in Worker constructor's second argument.
Fishrock123
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.workerIssues and PRs related to Worker support.Issues and PRs related to Worker support.