Node uses threads for file system IO and for some slow CPU-intensive operations, and for system calls that are not available asynchronously, and for spawning child processes (since you can't actually do that without a fork call.)
It does *not* use threads for async network IO, because it's unnecessary, and it certainly does not spawn a thread for each request to an HTTP server, or for each outbound HTTP request it makes. On Wed, Nov 7, 2012 at 2:27 PM, mscdex <[email protected]> wrote: > On Nov 7, 5:00 pm, Alberto Gori <[email protected]> wrote: >> Am I wrong? > > The only place the thread pool in node is used (AFAIK) is for async > file system calls. So, network I/O does not use extra threads as you > suggest. There is one main thread where the event loop lives and where > everything happens (except async file system calls as previously > noted). > > -- > 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
