The event loop is what allows Node.js to perform non-blocking I/O operations
  • by offloading operations to the system kernel whenever possible.
  • — despite the fact that JavaScript is single-threaded —

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.

10.Event Loop,Timers, and process.nextTick()

2019-02-16 23:22:24 0 10