Event Loop
Event Loop
Even though JavaScript is single threaded, Node.js employs event loop to perform asynchronous non-blocking I/O operations, by delegating the operations to the system kernel whenever possible. Most modern OS kernels are multi-threaded, capable of handling multiple operations by executing them in the background. When the current operation is completed, the kernel informs Node.js so that the appropriate callback may be added to the poll queue to eventually be executed