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

preview_player
Показать описание
JavaScript programmers like to use words like, “event-loop”, “non-blocking”, “callback”, “asynchronous”, “single-threaded” and “concurrency”.

We say things like “don’t block the event loop”, “make sure your code runs at 60 frames-per-second”, “well of course, it won’t work, that function is an asynchronous callback!”

If you’re anything like me, you nod and agree, as if it’s all obvious, even though you don’t actually know what the words mean; and yet, finding good explanations of how JavaScript actually works isn’t all that easy, so let’s learn!

With some handy visualisations, and fun hacks, let’s get an intuitive understanding of what happens when JavaScript runs.

License: For reuse of this video under a more permissive license please get in touch with us. The speakers retain the copyright for their performances.
Рекомендации по теме
Комментарии
Автор

9 years later, and this is still pure gold.

sumanyusoniwal
Автор

This talk is the perfect example of "If you can't explain it simply, you don't understand it well enough". Well done Philip.

mariosliquid
Автор

Today I had interview and was asked about execution context and i explained him based on this video. my interviewer was so impressed with the my answer. he said "This is the best explanation i have heard so far". made my day 🙂

apoorvasa
Автор

He understood it in 18 months, for me it took 26 minutes, that is how much he helped me, really appreciate it. Time is all you have. Thank you man!!!

syedmuhammadibtisam
Автор

watching this in 2019, and it is still the best source to learn JS event loop.

luciferonetwothree
Автор

13:45
"The event loop job is to look at the stack and look at the task queue. If the stack is empty, it takes the first thing on the queue and pushed it on to the stack."

AndreOliveira-vqiv
Автор

i can't even express how much i appreciate this video. i watch it every couple of months as a refresher. and encourage my team to do the same.

ceb
Автор

00:53 how does javascript actually work ? 02:46 V8, setTimeout 04:03 the call tack 07:18 blocking, what happens when things are slow 10:35 aynchronous callbacks, setTimout 11:13 aynchronous callbacks, the call stack 11:56 concurrency 12:50 stack, webapis, eventloop, task queue, console

domaincontroller
Автор

I like this guy. He's so humble and explains things with such clarity — an for a universal audience. That's no easy feat.

sunmustbedestroyed
Автор

8 years ago and this is still my favorite explanation of the event loop. Brilliant communication.

Rfuge
Автор

This gave me a breakthrough moment in realizing how async JS actually works. Really good talk.

element
Автор

I've returned to this video several times to engrain the concept of the event loop in my head. It's so clearly explained and so useful. Thanks so much for making it!

jonsanders
Автор

This is by far one of the best presentations on any programming concept I've ever seen. Absolutely brilliant. Thank you!!

hraynaud
Автор

Graduated in 2015, worked in JS alone for 4+ years, discovered this only today! Thank you

Hariharan-shbo
Автор

"I did not do a computer science degree, so these words... they're words"

I relate so so deeply with that

BURN-ADDiCT
Автор

This video is life-changing! Thank you for this, Philip! It takes great understanding to explain complex things in simple ways. And thank you for not gatekeeping - we need more people to come into tech and videos like this make sure that even noobs understand and can work with seemingly hard concepts!

manojmj
Автор

Really, Amazing talk, bro! :)
Once I came up across a scenario where calling a function, say "func()" did not work rather, setTimeout(func, 0) worked!
Now, I understood the reason completely!! :)

navaneethagastya
Автор

8 years down the lane for this video, current in year 2023. Buffering through many videos on event loop still find this one the best. The energy of this man...can feel it on screen as well. Wish i could attend his session once in my life in person.

mdmobasshir
Автор

Genius talk, seriously. Not hiding behind many fancy technicalities and being able to still convey high-level concepts and make them understandable is surely not an easy skill. Props!

MelMacaluso
Автор

thanks @Philip Roberts first time I completely understand event loop :). If you have some other video on js please share.

sushilkumartechy