Multithreaded JavaScript: Concurrency Beyond the Event Loop
內容描述
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 itUnderstand the differences between a web worker, a service worker, and a worker threadKnow when and when not to use threads in an applicationOrchestrate communication between threads by leveraging the Atomics objectBuild high-performance applications using the knowledge you gain from this bookBenchmark performance to learn if you'll benefit from multithreading
作者介紹
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.