The Event Loop: A 37 Paragraph Summary

This as a discussion on the single-threaded run time aspect of JavaScript and how certain slower processes — like network requests — can block the stack, thus delaying the other processes from loading. The alleviate the problems that these slower processes cause, you set a delay on the processes which push it to the queue to load. Then once the quicker processes that went straight to the stack are done, the processes in the queue then get sent to the stack to be run.

In addition, you can set up the asynchronous requests to allow breaks in the processes that go straight to the stack to allow some of the processes that were sent to the queue (so they could load) to then go to the stack.

So this talk discussed dealing with stack blocking from slower processes, and also dealing with letting the loaded slower processes that have finished loading get back into the stack which is congested by quick processes.

Like what you read? Give Matt Rice a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.