节点服务器是否有多个事件循环?

Does a node server have multiple event loops?

单节点服务器是否有多个事件循环?想知道如何使用服务器计算机的多个线程。

是否就像一台机器上有 10 个线程可用,因此创建了 10 个事件循环?

刚接触 javascript 服务器端开发,想了解其背后的工作原理。

Does a single node server have multiple event loops? [..] Is it like if 10 threads are available in a machine and so ten event loops are created?

不,NodeJS事件循环只有一个。

want to know how multiple threads of a server machine gets used.

引用自 NodeJS 站点 event-loop-timers-and-nexttick

Since most modern kernels are multi-threaded, they can handle multiple operations executing in the background. When one of these operations completes, the kernel tells Node.js so that the appropriate callback may be added to the poll queue to eventually be executed [by the event loop]

从 NodeJS 10.5 开始,您可以使用线程,它们的结果由同一个事件循环管理,该事件循环管理所有异步操作,如 IO 读数。