Actually that is not completely true - Both Windows and MacOSX's native file APIs support async file operations. The limitation might be coming from linux posix api.
On Monday, November 26, 2012 8:36:12 PM UTC-8, Ben Noordhuis wrote: > > On Mon, Nov 26, 2012 at 9:17 PM, Stefan Happer > <[email protected]<javascript:>> > wrote: > > Sorry for maybe dumb question but why does "htop" show multiple threads > for > > node.js ? Isn't node.js single-threaded? > > > > This is on a 4-core server running Ubuntu 12.04 LTS > > node.js is single-threaded insofar that JS code is executed from one > thread only. Some operations however, notably file operations, are > handed off to a thread pool. > > As to why, it's because of inherent limitations in today's popular > operating systems: none support true asynchronous file operations. > -- 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
