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

Can we support Worker API in node environment , like browser's Web work behavior. #8137

Closed
suplch opened this issue Aug 17, 2016 · 3 comments
Labels
question Issues that look for answers.

Comments

@suplch
Copy link

suplch commented Aug 17, 2016

main.js

var worker = new Worker('worker.js');
worker.addEventListener('message', function(event){
   // do something...
});

worker.js

// do something...
onmessage =function(event) {
    // do something...
    postMessage();
}
@MylesBorins
Copy link
Contributor

Closing

There is an open PR to try to do just this 🎉

#2133

Turns out it is pretty hard

@suplch
Copy link
Author

suplch commented Aug 17, 2016

Just found out that one [https://github.com/pgriess/node-webworker]

@MylesBorins
Copy link
Contributor

that project hasn't been touched since 2011, you might want to stay clear.

the cluster api or child process might help depending on what you want to
do

On Wed, Aug 17, 2016, 1:49 AM suplch notifications@github.com wrote:

Just found out that one [https://github.com/pgriess/node-webworker]


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#8137 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAecVydpAnShQFhiYJlg4zea9WjBzslrks5qgqDTgaJpZM4JmHFr
.

@addaleax addaleax added the question Issues that look for answers. label Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

3 participants