Salesqueen Software Solution

Download Free Estimation Now Click Here
Notifications
Clear all

What is an event loop in Node JS?

3 Posts
3 Users
0 Reactions
139 Views
Posts: 461
Topic starter
(@dinesha-g)
Reputable Member
Joined: 2 years ago

event loop in Node JS

2 Replies
Posts: 52
(@chitravarsha15)
Trusted Member
Joined: 2 years ago

An event loop is a NodeJS-based event-listener that is constantly available to listen for, process, and output events.

A mouse click, a keypress, or a timeout are all examples of events.

 

 

Reply
Posts: 173
(@princy)
Estimable Member
Joined: 2 years ago

Even though JavaScript is single-threaded, Node.js is able to perform non-blocking I/O operations by offloading tasks to the system kernel whenever possible. This is made possible by the event loop.

The majority of current kernels are multi-threaded, therefore they can manage numerous background operations. As soon as one of these operations is finished, the kernel notifies Node.js so that the appropriate callback can be added to the poll queue and eventually performed

Reply
Share: