3 ms·
Node.js only has a single thread for the event loop. (where the user's javascript is run) Internally it uses a thread pool. You could certainly do what you de
by mnutt 15y ago
Node.js only has a single thread for the event loop. (where the user's javascript is run) Internally it uses a thread pool.
You could certainly do what you describe and it would be very similar to node's Cluster module, which uses multiple processes. In fact, I believe in the next release they're giving you the option to replace processes with threads under the hood.
- chapel 15y agoThat actually isn't the case anymore. It has been removed for various reasons, a major one is stability. While the promise of isolates was nice, I think the choice to remove them was a good one considering the tradeoffs. More info: https://groups.google.com/forum/?fromgroups#!topic/nodejs/zLzuo292hX0 https://groups.google.com/forum/?fromgroups#!topic/nodejs/zL...