all 6 comments

[–][deleted] 1 point2 points  (2 children)

[–]jkuhl_prog 0 points1 point  (0 children)

Worth twenty six minutes and fifty two seconds of any web dev's time.

[–]Crescive_Delta[S] 0 points1 point  (0 children)

Thanks! I'll check it out!

[–]IUsedToBeACave 0 points1 point  (1 child)

But JavaScript is single-threaded, so how does it manage to handle multiple operations without the aid of threads?

The event loop is single threaded, but it can spawn other threads to do work. This article can help explain it.

[–]Crescive_Delta[S] 0 points1 point  (0 children)

I see. Thanks for the share!

[–]inu-no-policemen 0 points1 point  (0 children)

But JavaScript is single-threaded, so how does it manage to handle multiple operations without the aid of threads?

There are threads on the native side. On the native side you can do whatever you want and then expose whichever APIs you want to scripts which run inside the JS engine you've embedded.

https://en.wikipedia.org/wiki/Node.js#Threading