Very interesting. So asynchronous I/O usually relies on specific kernel procedures, and only in few situations it's emulated using threads.
Il giorno giovedì 8 novembre 2012 00:05:39 UTC+1, Isaac Schlueter ha scritto: > > 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 <msc...@gmail.com <javascript:>> > wrote: > > On Nov 7, 5:00 pm, Alberto Gori <forzaton...@gmail.com> 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 nod...@googlegroups.com<javascript:> > > To unsubscribe from this group, send email to > > nodejs+un...@googlegroups.com <javascript:> > > 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 nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en