4 ms·
I agree, async is needed sometimes. Another example, a server broadcasts an event to multiple clients (e.g. a chat app), it would be silly to spawn a thread per
by zhong-j-yu 12y ago
I agree, async is needed sometimes. Another example, a server broadcasts an event to multiple clients (e.g. a chat app), it would be silly to spawn a thread per client for that.
- syntheticlife 12y agoOr, sometimes you have to serve 10k pages at once. http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html
- korzun 12y agoBut the whole point of async is that, after data is dispatched the client moves on. I'm not sure what NodeJS does with it but this is my interpretation of the concept. I don't think people who know what they are doing, use async calls for mission critical operations. If async call returns response and client is required to read the response it's no longer considered non-blocking from technical perspective.
- deleted 12y ago[deleted]