While it doesn't have to mean threads, it typically does in one way or another. Even using node's built-in cluster library means spawning another worker process -- which has at least one thread.
Node is already concurrent, the event loop structure runs all of your code single-threaded... but IO code (like file and network access) are done by thread pool workers, hence the very asynchronous nature of Node.
As for being able to handle web requests more responsively, cluster works pretty well at that, which does as you mention... spawning up another process.
Stop pretending that Node is the only one that can use I/O completion ports.
Are you serious? This entire comment chain has been me telling you to use IOCP even if you aren't using node, and you insisting that starting up a blocking thread to wait for IO was totally necessary and the right thing to do.
The only thing that's embarrassing here is watching you learn about concurrency for the first time while still attempting to maintain your usual condescension and arrogance.
5
u/[deleted] Apr 27 '16
While it doesn't have to mean threads, it typically does in one way or another. Even using node's built-in
clusterlibrary means spawning another worker process -- which has at least one thread.Node is already concurrent, the event loop structure runs all of your code single-threaded... but IO code (like file and network access) are done by thread pool workers, hence the very asynchronous nature of Node.
As for being able to handle web requests more responsively, cluster works pretty well at that, which does as you mention... spawning up another process.