You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@legendecas Feel free to open a PR with this if you like – I think you can pass it around the same way that we pass workerData.
I would suggest process.argv to follow the standard format though, i.e. process.argv[0] is the Node.js binary being used and process.argv[1] is the main script name (of the Worker thread, in this case).
@legendecas As far as I am concerned, workerData was intended to be the (far more powerful) alternative that we’d use for worker threads, but I don’t personally see any issue with adding a more main-thread-like process.argv.
Activity
addaleax commentedon Nov 18, 2019
@legendecas Feel free to open a PR with this if you like – I think you can pass it around the same way that we pass
workerData.I would suggest
process.argvto follow the standard format though, i.e.process.argv[0]is the Node.js binary being used andprocess.argv[1]is the main script name (of theWorkerthread, in this case).legendecas commentedon Nov 18, 2019
@addaleax 😄 I'd like to. Just open the issue to ask around if it was left there intentionally.
addaleax commentedon Nov 18, 2019
@legendecas As far as I am concerned,
workerDatawas intended to be the (far more powerful) alternative that we’d use for worker threads, but I don’t personally see any issue with adding a more main-thread-likeprocess.argv.worker: add argv constructor option
worker: add argv constructor option
worker: add argv constructor option