December 2016
Intermediate to advanced
841 pages
17h
English
The TypeScript runtime (JavaScript) has a concurrency model based on an event loop. This model is quite different to the models in other languages such as C or Java. Before we focus on the event loop itself, you must understand some runtime concepts.
What follows is a visual representation of some important runtime concepts: heap, stack, queue, and frame:

We will now look at the role of each of these runtime concepts.
A frame is a sequential unit of work. In the preceding diagram, the frames are represented by the blocks inside the stack.
When a function is called in JavaScript, the runtime creates a frame in the stack. The frame ...
Read now
Unlock full access