JavaScript Concurrency Models: The Event Loopby@mozilla
699 reads

JavaScript Concurrency Models: The Event Loop

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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

Mozilla Contributors

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


Receive Stories from @mozilla

react to story with heart
Mozilla Contributors HackerNoon profile picture
by Mozilla Contributors @mozilla.Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.
Read My Stories

RELATED STORIES

L O A D I N G
. . . comments & more!