3

I want to know how Node.js as a single threaded JavaScript runtime/server handles other cores (if any) in a CPU. Should I write any extra code or setup for that? Or it will automatically utilize all the other cores when get much workload?

I want some details knowledge about this. Also, want some topics and references for study regarding this.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Primer Cielo
  • 113
  • 5
  • Have a look at node js workers https://nodejs.org/api/worker_threads.html, there are many guides out there, this seems like it has some meat on it: https://blog.logrocket.com/a-complete-guide-to-threads-in-node-js-4fa3898fe74f/ – Peheje Jun 15 '22 at 19:06
  • Also, I want to know the theory behind in plain but not with code only. – Primer Cielo Jun 15 '22 at 19:10
  • Good answer is here - https://stackoverflow.com/a/63225073/5992036 – SergeiMinaev Jun 15 '22 at 19:39

0 Answers0