#28 Event Loop in NODE JS | Fundamentals of NODE JS | A Complete NODE JS Course

  Рет қаралды 17,445

procademy

Жыл бұрын

In this lecture, let's understand a very important concept of NODE JS, which is its event loop. A event loop is responsible for executing the callback functions attached to an asynchronous task, by pushing it to the main thread for its execution.
Source code GIT Repo: github.com/manojjha86/NODE-JS/tree/main/NODE-JS-Basics

Пікірлер: 21
@mr.himanshu4299
@mr.himanshu4299 Жыл бұрын
you're the first guy on YT who explain this nodejs architecture and behind the scenes in depth . Respect++
@Aditya-gh4jy
@Aditya-gh4jy Жыл бұрын
this kind of explanation deserves views in millions. The detailed explanation that most of the videos around this topic lack.
@YashMehar-hf1fv
@YashMehar-hf1fv 8 ай бұрын
Well explained. It's crystal clear, and for the first time, I am understanding these concepts with more clarity. I am so glad that I came across your channel. I have watched your other JS, React, and Angular contents all are really amazing. Thanks a ton for such incredible effort👏
@sanyamjain7058
@sanyamjain7058 Жыл бұрын
U r gem to the JavaScript community , keep going on!
@Sai_ku_ma_r
@Sai_ku_ma_r Жыл бұрын
your explanation is awesome, Thank you, I am watching your Node.js & Angular videos they are the best videos on KZbin platform
@ojichukwuedwin4725
@ojichukwuedwin4725 3 ай бұрын
Your explanation is amazing and easy to understand. However, my question is, if call back functions with complex tasks will be pushed from event loop to thread poll till it's ready for execution how then will it block the main thread as it appeared in your guides to avoid blocking the main thread? If my question is erroneous due to unwholly understanding, do correct me. Once again, your explanation is perfect.
@faroukayadi1190
@faroukayadi1190 6 ай бұрын
Bro you're a legend, No word to describe you
@adnen3
@adnen3 Жыл бұрын
best explanation in youtube
@sufailkalathil169
@sufailkalathil169 9 ай бұрын
Super clear. Thank you
@noelkjoseph8466
@noelkjoseph8466 Жыл бұрын
Good Work, really helped!! One request, could you attach a pdf of contents or notes, that would be really helpful.
@anujpandey1562
@anujpandey1562 10 ай бұрын
Great explanation
@amitweil5217
@amitweil5217 Жыл бұрын
first of all great video, exactly what i was looking for. i do want to ask equest if you can explain or give an example in the video for promises and also async wait from the libuv & main thread perspective, i think it can be really helpful.
@vakhtangzhgenti
@vakhtangzhgenti Жыл бұрын
you need research about micro and macro tasks of event loop to answer your questions
@karimmuhammad7051
@karimmuhammad7051 11 ай бұрын
You're amazing brother, your content is star! really thanks so much i have question: how `timers` gets executed in thread pool? it is not heavy tasks! is that means all asynchronous code will be executed in thread pool?
@procademy
@procademy 11 ай бұрын
Timer functions are asynchronous functions. So yes, they will be executed in a threadpool. It does not matter if an asynchronous code is doing some heavy task or light task. All asynchronous code in Node will be executed in a threadpool.
@iamgirraj
@iamgirraj 10 ай бұрын
@@procademy but the callback that we pass inside setTimeOut() will be executed in the main thread after timer expires and if that callback again doing some heavy work then it should not block our main thread. it should be async code and executed in thread pool. when timer of setTimeoOut expires then the callback attached to it will be sent to event loop from the thread pool for inserting it into the callback queue related to Timers. Am i going correct sir?
@bharavikumar363
@bharavikumar363 4 ай бұрын
Hi please can you also explain about event queue in this architecture
@murshidameen5009
@murshidameen5009 Жыл бұрын
well explained
@hassannouri9796
@hassannouri9796 5 ай бұрын
❤❤❤
@korkut31
@korkut31 Жыл бұрын
they are not your own words. u get them completly from another where
@SakkaravarthiS-d7k
@SakkaravarthiS-d7k Ай бұрын
Kindly share notes or ppt
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 73 МЛН
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Funny superhero siblings
Рет қаралды 10 МЛН
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 44 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 73 МЛН