by vilequeef · 8mo ago · 0 comments
And you can make it thread-like if you prefer by creating a “load balancer” setup to begin with to keep them CPU bound.
require('os').cpus().length
Spawn a process for each CPU, bind data you need, and it can feel like multithreading from your perspective.More here https://github.com/bennyschmidt/simple-node-multiprocess
Most other ways are just hiding the context switching costs and complicating monitoring IMO.