Node.js Tutorial - 45 - I/O Queue

preview_player
Показать описание

📱 Follow Codevolution

I/O Queue
Рекомендации по теме
Комментарии
Автор

Update: The inconsistency shown on 4:40 seems to be fixed on the latest versions of Node.js. The order is guaranteed being the timerCb() always executed before the readCb(), even when 1ms delay is passed.

fesbb
Автор

Vishwas - you are one of the best educator of Youtube community (for Web Dev), just hats off to your technical knowledge and details, I am just fan of it, May God bless you and you keep creating such wonderful content.🙏

narotamkumarmishra
Автор

amazing video. I've been trying to follow the nodeJS official tutorial, but their event loop explanation was not the best. So your videos did save the day for me. Now I can confidently go back to that tutorial. Thanks again!

thuanncats
Автор

Good info on the actual underlying setTimeout(..., 0) implementation. I never knew that. Also, using the huge for-loop at the end to "even the score" so to speak further reinforces the idea that these queues do not get run until the main thread is done or yields control. Nicely done! Great series!

matthewslyh
Автор

Now you are my coding hero. I watched so many channels for learning different topics. But I learned so much and all those things I learned I'll never forget those topics. Take love bro.

avijitsaha
Автор

I had read articles about these anamoly but never got exact reason. Thanks to u for that explanation 👌.

awh
Автор

Best Series on Nodejs, Enjoyed the explanation about different queues and it's priority of execution. Thank you.

googlemani
Автор

Dude is a real web mage, thanks Vishwas

caaltz
Автор

Hats off to you bro.. Nice explanation...

MultiMtech
Автор

Jahapana tussi great ho, toufa kubul karo

loveutube
Автор

in my tests readFile is always last. pehaps it depends on disk speed. any way setTimeout is always first in my tests.

mkrzyzowski
Автор

Hello, Sir in further video you explain that fileread actually needs I/O polling to run in the first round and then a callback will be pushed into the I/O queue and in the second cycle won't the setTimeout CB function be present in the Timer queue.

freebe
Автор

setimmediate is being called before I/O queue, when I try to run this kind of tests

andreuamadeusayaipomacondo
Автор

Does the "emptied until live completion" only happens between promise queue and nextTick queue?

mohitpal
Автор

After completing a CB from I/O callback, will the event loop check the microtask queue again?

prajwalm.s
Автор

the inconsistency in the setTimeout() with I/O async with a 0 delay has been fix, so in my system it runs successfully

ChineduUmeh-sp
Автор

When it comes to Timer queue, does the callback function of setTimeout gets enqueued after the time passed has elapsed, or is it first enqueued and then the timer begins?

mohitpal
Автор

Mmm... this one, I'm sure I nailed.
First (no pun intended), conceptually, I find it ironic that a callback with a name such as "setTimeout" and with an argument of 0 - won't run first (before any other callback in the event loop beside the micro-tasks queue).
Second, the interval part is not entirly clear .
Why if the CPU was busy and the even loop start after 1:01 milisecond, there isn't inteval of max 1 milisecond as well.
And the reason that it is not clear is because THE TRIGGER of the inteval ITSELF isn't clear.

shineLouisShine
Автор

Hello, I notice something strange. If I use node -v 16.x.x the above inconsistency is the same. But If I use node v 20.x.x it seems that the timer queue always comes before the I/O queue. Did not check the documentation but it seems that at some version between 16-20 this got changed

Alexandru-OM
Автор

Bro please I need some suggestions from you
I'm currently Working as a python developer with 1.5 years of experience.
Two weeks before amazon contacted me and offered me a support engineer role
I got selected in the interview rounds.But I'm Confused whether to join or not
bcaz the mass layoffs
location: chennai amazon alexa data services
I'm a moderate in coding..Not an expert
Even if i go amazon and got layed off after 6 months..Can i get a good job after that? can this be affect my career and made a dent on my cv

krishdeva