When I call .spawn to make a new child process in Node.js, does this take advantage of multi-core CPUs?
当我调用.spawn在Node.js中创建一个新的子进程时,这是否利用了多核CPU?
Reference: https://nodejs.org/api/child_process.html
1 个解决方案
#1
5
Yes, a new process will be created and managed by your OS. That new process can be executed in parallel to the main process as long as your computer has at least 2 virtual CPU cores.
是的,您的操作系统将创建和管理新流程。只要您的计算机至少有2个虚拟CPU核心,该新进程就可以与主进程并行执行。
#1
5
Yes, a new process will be created and managed by your OS. That new process can be executed in parallel to the main process as long as your computer has at least 2 virtual CPU cores.
是的,您的操作系统将创建和管理新流程。只要您的计算机至少有2个虚拟CPU核心,该新进程就可以与主进程并行执行。