Node JS: Event Loop

Despite being single threaded, Node-Js allows asynchronous programming and non-blocking operations by using Event loop. Node has an event driven architecture and code is executed is in the form of callbacks. The Event Loop schedules the callbacks to be run in the single thread at a given point. Libuv is the library that provides the implementation of event loop and thread pool in Nodejs. When a node process starts execution, the top level code is executed first, and all the callbacks are registered....

October 14, 2021 · 6 min · Me