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之間的區別

  • 了解何時以及何時不在應用程序中使用線程

  • 通過利用原子對象協調線程之間的通信

  • 利用從本書中獲得的知識構建高性能應用程序

  • 通過性能基準測試來了解是否從多線程中受益

作者簡介

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的組織者。Thomas已經出版了四本書,其中包括O'Reilly出版的《使用Node.js的分散式系統》。

Bryan是一位開源JavaScript和Rust程式設計師,對此充滿熱情,並曾參與大型企業系統、儀器設備和應用程式安全方面的工作。目前,他是Datadog的高級開源軟體工程師。自從Node.js創立不久以來,他就在專業和個人項目中都使用Node.js。他還是Node.js核心合作者,通過多個不同的工作小組在許多方面對Node.js做出了貢獻。