paint-brush
JavaScript Concurrency Models: The Event Loopby@mozilla
700 reads
700 reads

JavaScript Concurrency Models: The Event Loop

by Mozilla Contributors5mJanuary 14th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

JavaScript has a concurrency model based on an event loop, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks. This model is quite different from models in other languages like C and Java. Modern JavaScript engines implement and heavily optimize the described semantics. The event loop got its name because of how it's usually implemented, which usually resembles: while (queue.processNextMessage()) Each message has an associated function which gets called in order to handle the message.

Company Mentioned

Mention Thumbnail
featured image - JavaScript Concurrency Models: The Event Loop
Mozilla Contributors HackerNoon profile picture
Mozilla Contributors

Mozilla Contributors

@mozilla

Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.

About @mozilla
LEARN MORE ABOUT @MOZILLA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Mozilla Contributors HackerNoon profile picture
Mozilla Contributors@mozilla
Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite