4 ms·
Yes, concurrently, but not necessarily in parallel [1]. Here's an example of what the author meant: while (True); Executing this within a request will blo
by smilliken 14y ago
Yes, concurrently, but not necessarily in parallel [1]. Here's an example of what the author meant:
while (True);
Executing this within a request will block all other requests in a single-threaded web server.
[1] http://stackoverflow.com/questions/1897993/difference-between-concurrent-programming-and-parallel-programming http://stackoverflow.com/questions/1897993/difference-betwee...
- jeremyjh 14y agoThe author is talking about concurrency, and so am I. Why the downvote? That quote comes from his paragraph headed "Concurrency". It also refers directly to concurrent HTTP requests. Well, a single Tornado or Node.js process can generally handle many thousands of concurrent HTTP requests if they are implemented correctly without blocking on I/O.
- spankalee 14y agoBut even if the request handlers don't perform blocking I/O, the interpreter is still single threaded, so any computation the handler does blocks all other handlers - only one runs at a time. "Concurrency" in the context of node.js usually is referring to simultaneous connections, not parallel handling of the connections.