VP of DevRel RapidAPI ❯ Award-winning Web Developer NodeCLI.com ❯ Google Dev Expert Web tech ❯ 2x GitHub Stars Award ❯ WordPress Core Dev ❯ TEDx Speaker ❯ "awesome example for devs" — Satya Nadella
Location
San Francisco Bay Area
Education
EE-CS Engineer turned Software Developer
Work
VP of DevRel (DX Eng., Content & Community) RapidAPI ❯ Google Dev Expert ❯ GitHub Star ❯ NodeCLI.com
Unfortunately that's a wrong diagram for the event loop. Node.js event loop is not like the JavaScript loop at all. 99% of diagrams like these are just simply wrong.
I taught this as part of my premium Node CLI Development course, but just shared that 10min video on Node.js theory, publicly for free on my YouTube Channel here.
I think both explanations are part of the bigger picture of what actually the event loop does. async tasks are assigned to the thread pool and when finished their call back functions are put in the event queue. when nodejs's execution stack is empty, the event pool takes the first cb from the event queue and puts it back in the stack for execution
VP of DevRel RapidAPI ❯ Award-winning Web Developer NodeCLI.com ❯ Google Dev Expert Web tech ❯ 2x GitHub Stars Award ❯ WordPress Core Dev ❯ TEDx Speaker ❯ "awesome example for devs" — Satya Nadella
Location
San Francisco Bay Area
Education
EE-CS Engineer turned Software Developer
Work
VP of DevRel (DX Eng., Content & Community) RapidAPI ❯ Google Dev Expert ❯ GitHub Star ❯ NodeCLI.com
Thanks a lot for your feedback and, as a developer, I'm always looking forward to learning and improving my knowledge. I'll really appreciate suggestions about correct examples of Node.js diagrams in order to update my article, so feel free to share them!
VP of DevRel RapidAPI ❯ Award-winning Web Developer NodeCLI.com ❯ Google Dev Expert Web tech ❯ 2x GitHub Stars Award ❯ WordPress Core Dev ❯ TEDx Speaker ❯ "awesome example for devs" — Satya Nadella
Location
San Francisco Bay Area
Education
EE-CS Engineer turned Software Developer
Work
VP of DevRel (DX Eng., Content & Community) RapidAPI ❯ Google Dev Expert ❯ GitHub Star ❯ NodeCLI.com
I taught this as part of my premium Node CLI Development course, but just shared that 10min video on Node.js theory, publicly for free on my YouTube Channel here.
Unfortunately that's a wrong diagram for the event loop. Node.js event loop is not like the JavaScript loop at all. 99% of diagrams like these are just simply wrong.
I taught this as part of my premium Node CLI Development course, but just shared that 10min video on Node.js theory, publicly for free on my YouTube Channel here.
I hope it's helpful.
Would you have an example of a good diagram? Share with us, please!
You read about event loop here.
Thanks a lot for sharing, for sure I'll read about it!
I think both explanations are part of the bigger picture of what actually the event loop does. async tasks are assigned to the thread pool and when finished their call back functions are put in the event queue. when nodejs's execution stack is empty, the event pool takes the first cb from the event queue and puts it back in the stack for execution
Just edited my comment with the explanation/video — I hope it helps.
Thanks a lot for your feedback and, as a developer, I'm always looking forward to learning and improving my knowledge. I'll really appreciate suggestions about correct examples of Node.js diagrams in order to update my article, so feel free to share them!
I taught this as part of my premium Node CLI Development course, but just shared that 10min video on Node.js theory, publicly for free on my YouTube Channel here.
I hope it's helpful.
I found this talk from Bryan Hughes, Microsoft the best there is to understand the Node.js event loop
Thanks a lot for sharing this valuable content!