3.1 Threading model

Each time a runtime operates—whether it's Node.js, Deno, or Bun—it employs a specific threading model. This threading model outlines the threads existing within the process and clarifies their individual roles. When combined with the overarching structure of the system, grasping the intricacies of the threading model becomes significantly crucial.

It's worth noting that Deno's threading model deviates somewhat from the norm. Deno sets itself apart by utilizing two distinct types of threads: those that are conscious of the operating system (OS aware) and those that are not (OS unaware). This unique approach contributes to Deno's distinctive behavior.

Within the confines of this chapter, we will delve into the default threads that Deno generates. Alongside that, we'll delve into the realm of web workers and asynchronous operations, both of which wield influence over the threading model. By the chapter's end, you'll have gained a comprehensive understanding of these threads, their interplay, and their significance within Deno's threading framework.

Chapter contents

Last updated