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

Node should work in Web Workers [$105] #494

Closed
rogerwang opened this issue Mar 2, 2013 · 45 comments
Closed

Node should work in Web Workers [$105] #494

rogerwang opened this issue Mar 2, 2013 · 45 comments
Labels

Comments

@rogerwang
Copy link
Member

There is a $105 open bounty on this issue. Add to the bounty at Bountysource.

@sindresorhus
Copy link

👍

@icetan
Copy link

icetan commented Mar 26, 2013

This would be very helpful to me. Currently I'm having problems with GUI hanging on computationally heavy stuff.

@dubcanada
Copy link

This would be awesome!

@epodolyak
Copy link

We are unzipping large files using adm-zip and our app hangs now. Would be great if we could move this code to webworker.

@miklschmidt
Copy link

+1!

@YurySolovyov
Copy link

any news on that or on child_processes? i really need to offload main thread. attaching node executable to app package is not an option.

@gunnar-t
Copy link

I agree: this would be a real nice (and imho needed) feature for doing non-blocking actions like unzipping, encryption, decryption, and so on. Currently i am doing a lot of stuff with HTML5 FileAPI ...

@Anonyfox
Copy link

Anonyfox commented Jul 3, 2013

+10, this would be the single most important feature for me for the next version. Currently https://groups.google.com/forum/#!topic/node-webkit/ZBD3SVKmPSM there is no response :(

@ibdknox
Copy link
Contributor

ibdknox commented Jul 3, 2013

At current I've just taken to packaging node with my app and using child_process.fork. It actually works very nicely.

@gunnar-t
Copy link

gunnar-t commented Jul 3, 2013

Then maybe you can present a little example? According to issue #368 and #213 fork is/was broken. I am not sure if the patch made it through?! In my app the child_process.fork is still broken?! (And I have the current version of node-webkit...)
I am confused :)

@ibdknox
Copy link
Contributor

ibdknox commented Jul 3, 2013

var worker = require("child_process").fork("testworker.js", {execPath: "/path/to/included/node"});

@gunnar-t
Copy link

gunnar-t commented Jul 3, 2013

Ups. Thanks. I did not see that option in the nodejs manual. Thanks for the code. (by the way execPath should point to node.exe I think.

Thank you very much for that fast help 👍

@katanacrimson
Copy link

@gunnar-t it's only .exe on windows - the path he shows is one for a unix-y system. :)

@gunnar-t
Copy link

gunnar-t commented Jul 3, 2013

Oh. Of course. It's been a long day in the office. So it seems half of my brain is already sleeping :)
I just should not post half sleeping.

@katanacrimson
Copy link

Don't code half sleeping either, in my experience that has just as awful of results. ;)

@gunnar-t
Copy link

gunnar-t commented Jul 3, 2013

Yeah, but sometimes funny moments the next time you take a look at your code :)

@YurySolovyov
Copy link

any plans for this in 0.7.X?

@jasonfutch
Copy link

Any update if this is still in the works? My app would run better if I could offload some of the heavy weight stuff on another processes.

@YurySolovyov
Copy link

@jasonfutch yeah, another interesting thing is that more kinds of web workers is coming, like ServiceWorkers and SharedWorkers, so it would be great to solve that issue ASAP.

@kraag22
Copy link

kraag22 commented Jan 22, 2014

this would be a killer feature!

@Anonyfox
Copy link

huge +1.

@iwege
Copy link

iwege commented Mar 21, 2014

+1

@rogerwang rogerwang changed the title Node should work in Web Workers Node should work in Web Workers [$50] Apr 25, 2014
@shabeepk
Copy link

+1

1 similar comment
@formula1
Copy link

+1

@rogerwang rogerwang changed the title Node should work in Web Workers [$50] Node should work in Web Workers [$100] May 30, 2014
@thomaswrenn
Copy link

+1!!!!!!!

@SpeakBen
Copy link

+1

@rogerwang rogerwang changed the title Node should work in Web Workers [$100] Node should work in Web Workers [$105] Jun 20, 2014
@octalmage
Copy link

This would be huge, just added to the bounty!

@twicey
Copy link

twicey commented Jun 20, 2014

+1

2 similar comments
@laike9m
Copy link

laike9m commented Aug 4, 2014

+1

@fmartingr
Copy link

+1

@smolleyes
Copy link

m endoooooooooooooooooooooooooooooooooorsss >:o

Le 12/08/2014 14:09, Felipe a écrit ::'(

+1


Reply to this email directly or view it on GitHub
#494 (comment).

@burakcan
Copy link

What is the status on this?

@ekelokorpi
Copy link

Any news on this? Or other workarounds?

@makeusabrew
Copy link

Really interested in this too :) /cc @rogerwang

@makeusabrew
Copy link

For what it's worth child_process.fork worked nicely for me. A lot of the documentation / issues on the subject (including those links) are quite old. I've only tested on Linux and OS X but so far no problems.

@shabeepk
Copy link

The issue is windows specific.

Thanks,

Regards,

Sharique
On Apr 28, 2015 1:40 AM, "Nick Payne" [email protected] wrote:

For what it's worth child_process.fork worked nicely for me. A lot of the
documentation / issues on the subject (including those links) are quite
old. I've only tested on Linux and OS X but so far no problems.


Reply to this email directly or view it on GitHub
#494 (comment).

@makeusabrew
Copy link

@shabeepk I've just been able to test things on two windows machines (7 and 8) and child_process.fork still worked well. What issues are you experiencing with the latest 0.12.x builds?

@michahell
Copy link

How does the bountysource thing work? Can I +1 this feature and add 5$ or something?

@lcb931023
Copy link

  1. Any news on this?
  2. What's the issue with Windows and child_process.fork?

@makeusabrew
Copy link

@lcb931023 regarding (2): I've not encountered any issues with child_process.fork under windows in an app which has been in use since April last year. That's not to say there aren't potential issues somewhere, just that I've yet to encounter any :).

@lcb931023
Copy link

@makeusabrew haha good to know, thanks, will keep an eye out

@rogerwang
Copy link
Member Author

Node.js is now supported in Web Workers. The feature is now in git and will be released with 0.18.4 soon.

If you find any bug about the feature, please do NOT follow up here, file a new issue instead.

@rogerwang
Copy link
Member Author

It's built here: http://dl.nwjs.io/live-build/10-28-2016/nw18-64d2849-1d4579d-ae7e389-41840a3/v0.18.4/

You need to use '--enable-node-worker' to turn on this feature.

@rogerwang
Copy link
Member Author

docs commit: 226c356

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

No branches or pull requests