Multithreaded JavaScript: Concurrency Beyond the Event Loop
暫譯: 多執行緒 JavaScript:超越事件迴圈的併發性

Hunter, II Thomas, English, Bryan

買這商品的人也買了...

相關主題

商品描述

Until recently, JavaScript concurrency was achieved by splitting up tasks and scheduling them. But thanks to language advancements such as web workers in the browser, JavaScript is now a multithreaded language. What does that mean for you? In this practical book, authors Thomas Hunter II and Bryan English explain JavaScript threads as a programming concept and tool.

Not every problem needs to be solved with threads, but having this tool in your toolbox will help you arrive at the most appropriate solution. This book explores various features that JavaScript runtimes have at their disposal for implementing multithreaded programs. By exploring practical real-world examples, you'll discover when to use threads and when not to.

  • Learn what multithreaded programming is and how you can benefit from it
  • Understand the differences between a web worker, a service worker, and a worker thread
  • Know when and when not to use threads in an application
  • Orchestrate communication between threads by leveraging the Atomics object
  • Build high-performance applications using the knowledge you gain from this book
  • Benchmark performance to learn if you'll benefit from multithreading

商品描述(中文翻譯)

直到最近,JavaScript 的併發是透過將任務拆分並進行排程來實現的。但多虧了語言的進步,例如瀏覽器中的 web workers,JavaScript 現在成為了一種多執行緒語言。這對你意味著什麼?在這本實用的書中,作者 Thomas Hunter II 和 Bryan English 解釋了 JavaScript 執行緒作為一種程式設計概念和工具。

並不是每個問題都需要用執行緒來解決,但擁有這個工具在你的工具箱中將幫助你找到最合適的解決方案。本書探討了 JavaScript 執行環境可用於實現多執行緒程式的各種特性。透過探索實際的真實世界範例,你將發現何時應該使用執行緒,何時不應該使用。

- 了解什麼是多執行緒程式設計以及你如何從中受益
- 理解 web worker、service worker 和 worker thread 之間的差異
- 知道在應用程式中何時應該使用執行緒,何時不應該使用
- 利用 Atomics 物件協調執行緒之間的通信
- 使用你從本書中獲得的知識構建高效能應用程式
- 基準測試性能以了解你是否會從多執行緒中受益

作者簡介

Thomas Hunter II has contributed to dozens of enterprise Node.js services and has worked for a company dedicated to securing Node.js. He has spoken at several conferences on Node.js and JavaScript, is JSNSD/JSNAD certified, and is an organizer of NodeSchool SF. Thomas has published four books including Distributed Systems with Node.js by O'Reilly.

Bryan is an open source JavaScript and Rust programmer and enthusiast and has worked on large enterprise systems, instrumentation, and application security. Currently he's a Senior Open Source Software engineer at Datadog. He's used Node.js both professionally and in personal projects since not long after its inception. He is also a Node.js core collaborator and has contributed to Node.js in many ways through several of its various Working Groups.

作者簡介(中文翻譯)

托馬斯·亨特二世(Thomas Hunter II)參與了數十個企業級的 Node.js 服務,並曾在一家專注於 Node.js 安全的公司工作。他在多個有關 Node.js 和 JavaScript 的會議上發表過演講,並獲得了 JSNSD/JSNAD 認證,同時也是 NodeSchool SF 的組織者。托馬斯出版了四本書籍,其中包括 O'Reilly 出版的《使用 Node.js 的分散式系統》(Distributed Systems with Node.js)。

布萊恩(Bryan)是一位開源的 JavaScript 和 Rust 程式設計師及愛好者,曾參與大型企業系統、儀器化和應用安全的工作。目前,他是 Datadog 的高級開源軟體工程師。他自 Node.js 創立不久後便在專業和個人專案中使用 Node.js。他也是 Node.js 的核心合作者,並通過多個工作組以多種方式為 Node.js 做出了貢獻。