8 ms·
> Within a single request, Node can async its dealing with outside services (databases, api's, etc), but it is still only processing one request at a time. Ther
by hpguy 14y ago
> Within a single request, Node can async its dealing with outside services (databases, api's, etc), but it is still only processing one request at a time. There is no 'synchronized' keyword in javascript. ;-)
This is as wrong as it can get. Multiple requests are processed "concurrently", in the sense that a request gets served as soon as an existing request awaits on async calls. It is different from thread-based concurrency and thus there is no need for things like "synchronized" keyword.
- latchkey 14y agoI think we are saying the same thing. When I say 'it is still only processing one request at a time', I'm referring to my code execution, not the async stuff or anything else within Node. I found this to be a good explanation... http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop/ http://blog.mixu.net/2011/02/01/understanding-the-node-js-ev...