Skip to content
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

How Do you pass flages to NodeJS such as '--experimental-worker'? #15748

Closed
vijayee opened this issue Nov 18, 2018 · 6 comments
Closed

How Do you pass flages to NodeJS such as '--experimental-worker'? #15748

vijayee opened this issue Nov 18, 2018 · 6 comments

Comments

@vijayee
Copy link

vijayee commented Nov 18, 2018

How do you pass in flags to node to enable experimental features like '--experimental-worker'. I want to use the node version of workers in my electron application.

@welcome
Copy link

welcome bot commented Nov 18, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@sofianguy
Copy link
Contributor

Thanks for reaching out!

Because we treat our issues list as the team's backlog, we close issues that are questions since they don't represent a task needing to be completed. For most questions about Electron there are a lot of options.
Check out the Electron community. There are also a bunch of helpful people in this community forum that should be willing to point you in the right direction.

@vijayee
Copy link
Author

vijayee commented Nov 25, 2018

@sofianguy Yeah ..... the forum and slack is dead. How does anyone actually get help with electron. There are other people having the same issue as me needing help.

@ghost
Copy link

ghost commented Dec 11, 2018

Need help with this also. Using Parcel and need --experimental-worker.

@crossle
Copy link

crossle commented Dec 13, 2018

How to enable --experimental-worker?

@vijayee
Copy link
Author

vijayee commented Dec 13, 2018

@oyalhi and @crossle The way you would enable it is $ electron --js-flags="--experimental-worker" your-app taken from https://github.com/electron/electron/blob/451b1782acfef01dd0758e7b9ddb329700626b98/docs/api/chrome-command-line-switches.md
However this will not work because this flag is not available to see all flags you can use $ electron --js-flags="--help" your-app and it is not listed. So unfortunately no worker threads in electron yet. I have been using the cluster api instead until this feature is no longer experimental.
https://nodejs.org/dist/latest-v10.x/docs/api/cluster.html
I have example code here https://github.com/vijayee/js-offs/blob/master/src/block-cache-cluster.js
vs its worker counterpart https://github.com/vijayee/js-offs/blob/master/src/block-cache-worker.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants