-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 i use node.js worker in nwjs? #7114
Comments
Could you please provide a full sample (not code snippets) so we can reproduce? |
I have same issue:
|
Seems this problem not only with nwjs... |
This was fixed in this build: https://dl.nwjs.io/live-build/nw44/20191222-092932/9d6206a45/v0.44.0-beta1/ |
The fix is released in 0.44.0 beta1 |
Hm but i dont see how it fixed something...?
|
This works for me: <script>
const wt = require('worker_threads');
let w = new wt.Worker('./worker.js');
</script> worker.js: const fs=require('fs');
fs.writeFileSync('output.txt', "hello world"); |
@rogerwang When attempting to validate this fix I found that NW.js 0.44.0 Beta 1 (SDK) crashes when running the above code. Reproduction:
Tested in Windows 7 64. |
NW.js 0.44.1 still has this problem (tested on windows 10 64 bits) or well, more specifically, it crashes the application(closing it completly if I try opening the dev tools to check for errors) |
@rogerwang any news? |
Still Waiting .... |
This is fixed in git and will be available in the next nightly build. |
I checked simple scenario is working, Thanks |
I try check, but have problems...
|
your sample should work, I just tested with roger's sample:
worker.js:
also tested post message and work data and all work. |
Thanks for testing, yes it was my mistake... Seems all work
|
Hey, It is exactly the above example. An HTML and a Server.js is loaded. In the Server.js a WebWorker is called. index.html.txt Can anyone else confirm the behavior, or am I missing something? |
when i use node.js woker in nwjs, there is an error
Uncaught Error: The V8 platform used by this instance of Node does not support creating Workers.
nwjs version is 0.39.2 win x64
The text was updated successfully, but these errors were encountered: