On Oct 1, 2014, at 7:06 AM, Kleyson Rios <
kley...@gmail.com> wrote:
> I would like to know how exactly parallel execution works.
>
> I'm using nimble module to execute some functions in parallel, and the result of those executions be used for a final calculation. When I run flow.parallel what exactly happens ? I mean, is it created a thread for each function ? those threads share the same CPU or the threads are spread over all CPU's ?
Perhaps surprisingly, node doesn't execute any javascript functions in parallel. It's actually strictly a single-threaded process. Anything that would block on IO or a timer gets deferred until the resource is available, but those tools are for managing asynchronous, not actually concurrent functions.
Aria