geddesign,

You can do this today with child processes.  Nothing about the
child_process module is being removed from the plans except the
{thread:true} argument, which requires a lot of internal changes to
support.

The drawback of using child processes instead of threads is that (a)
it's a bit more expensive to fire them up, and (b) all communication
has to be over a serialized channel (unless you use something like
shm_open).

Regarding (a), you still have the cost of starting the v8 context in
an isolate, so it's not *that* much of a savings.  Regarding (b), web
workers serialize everything to json and back just like node's
child_process.fork() approach.

There are other semantic differences between processes and threads, of
course.  They're very different from the system's point of view, and
so maintaining the same semantics with both approaches was part of
what made this feature so difficult.

On Fri, Feb 3, 2012 at 13:54, geddesign <[email protected]> wrote:
> @Isaac I'm a little disappointed because this feature was going to make Node
> more able to do intense CPU-bound operations without blocking everything
> else, a limitation that is one of Node's biggest criticisms. The browsers
> elegantly solve this problem with web workers. Is there a reason Node
> couldn't use web workers or something like it to solve the issue?
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to