What is the Event Loop?

The event loop is what allows Node.js to perform non-blocking I/O operations
Post Reply
aryatechno
Site Admin
Posts: 9
Joined: Tue Sep 26, 2023 9:01 am

What is the Event Loop?

Post by aryatechno »

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

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. We'll explain this in further detail later in this topic
Post Reply