Event Loop

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

Event Loop in Browser (JavaScript) (Must watch)

What the heck is the event loop anyway? | Philip Roberts | JSConf EU

js-1_mpxqbk.png

js-2_mo9uqy.png

Regardless of the time set here, we will first run the immidiate code (console.log(’new task’)) first before the callback.

Event Loop in NodeJS

event-loop_gohdkk.png

Must Watch:

Morning Keynote- Everything You Need to Know About Node.js Event Loop - Bert Belder, IBM

Note: You won’t get all of the video. Just try to understand the basics.