Sitelet https://github.com/nodejs/node/issues/8137
Skip to content

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

Description

@suplch

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();
}

Activity

  1. MylesBorins commented on Aug 17, 2016

    @MylesBorins
    Contributor

    Closing

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

    #2133

    Turns out it is pretty hard

  2. suplch commented on Aug 17, 2016

    @suplch
    Author

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

  3. MylesBorins commented on Aug 17, 2016

    @MylesBorins
    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
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions