Queue

The queue contains a list of messages waiting to be processed. Each message is associated with a function. When the stack is empty, a message is taken out of the queue and processed. The processing consists of calling the associated function and adding the frames to the stack. The message processing ends when the stack becomes empty again.

In the previous runtime diagram, the blocks inside the queue represent the messages.

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.