Cargando…

Multithreaded JavaScript /

Traditionally, JavaScript has been a single-threaded language. Nearly all online forum posts, books, online documentation, and libraries refer to the language as single threaded. Thanks to recent advancements in the language--such as the Atomics and SharedArrayBuffers objects and Web Workers in the...

Descripción completa

Detalles Bibliográficos
Autores principales: Hunter, Thomas (Autor), English, Bryan (Autor)
Autor Corporativo: Safari, an O'Reilly Media Company
Formato: Electrónico eBook
Idioma:Inglés
Publicado: O'Reilly Media, Inc., 2021.
Edición:1st edition.
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)

MARC

LEADER 00000cam a22000007a 4500
001 OR_on1251847681
003 OCoLC
005 20231017213018.0
006 m o d
007 cr cnu||||||||
008 190421s2021 xx o 000 0 eng
040 |a AU@  |b eng  |e pn  |c AU@  |d EBLCP  |d OCLCQ  |d TOH  |d OCLCQ 
020 |z 9781098104436 
024 8 |a 9781098104429 
029 0 |a AU@  |b 000069138868 
035 |a (OCoLC)1251847681 
082 0 4 |a 005.2762  |q OCoLC  |2 23/eng/20230216 
049 |a UAMI 
100 1 |a Hunter, Thomas,  |e author. 
245 1 0 |a Multithreaded JavaScript /  |c Hunter, Thomas. 
250 |a 1st edition. 
264 1 |b O'Reilly Media, Inc.,  |c 2021. 
300 |a 1 online resource (200 pages) 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
347 |a text file 
520 |a Traditionally, JavaScript has been a single-threaded language. Nearly all online forum posts, books, online documentation, and libraries refer to the language as single threaded. Thanks to recent advancements in the language--such as the Atomics and SharedArrayBuffers objects and Web Workers in the browser--JavaScript is now a multi-threaded language. These features will go down as being the biggest paradigm shift for the world's most popular programming language. Multithreaded JavaScript explores the various features that JavaScript runtimes have at their disposal for implementing multithreaded programming, providing both practical real-world examples, as well as reference material. 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. 
542 |f Copyright © O'Reilly Media, Inc. 
550 |a Made available through: Safari, an O'Reilly Media Company. 
588 |a Online resource; Title from title page (viewed November 25, 2021) 
505 0 |a Cover -- Copyright -- Table of Contents -- Foreword -- Preface -- Target Audience -- Goals -- Conventions Used in This Book -- Using Code Examples -- O'Reilly Online Learning -- How to Contact Us -- Acknowledgments -- Chapter 1. Introduction -- What Are Threads? -- Concurrency Versus Parallelism -- Single-Threaded JavaScript -- Hidden Threads -- Threads in C: Get Rich with Happycoin -- With Only the Main Thread -- With Four Worker Threads -- Chapter 2. Browsers -- Dedicated Workers -- Dedicated Worker Hello World -- Advanced Dedicated Worker Usage -- Shared Workers 
505 8 |a Shared Worker Hello World -- Advanced Shared Worker Usage -- Service Workers -- Service Worker Hello World -- Advanced Service Worker Concepts -- Message Passing Abstractions -- The RPC Pattern -- The Command Dispatcher Pattern -- Putting It All Together -- Chapter 3. Node.js -- Before We Had Threads -- The worker_threads Module -- workerData -- MessagePort -- Happycoin: Revisited -- With Only the Main Thread -- With Four Worker Threads -- Worker Pools with Piscina -- A Pool Full of Happycoins -- Chapter 4. Shared Memory -- Intro to Shared Memory -- Shared Memory in the Browser 
505 8 |a Shared Memory in Node.js -- SharedArrayBuffer and TypedArrays -- Atomic Methods for Data Manipulation -- Atomics.add() -- Atomics.and() -- Atomics.compareExchange() -- Atomics.exchange() -- Atomics.isLockFree() -- Atomics.load() -- Atomics.or() -- Atomics.store() -- Atomics.sub() -- Atomics.xor() -- Atomicity Concerns -- Data Serialization -- Booleans -- Strings -- Objects -- Chapter 5. Advanced Shared Memory -- Atomic Methods for Coordination -- Atomics.wait() -- Atomics.notify() -- Atomics.waitAsync() -- Timing and Nondeterminism -- Example of Nondeterminism -- Detecting Thread Preparedness 
505 8 |a Example Application: Conway's Game of Life -- Single-Threaded Game of Life -- Multithreaded Game of Life -- Atomics and Events -- Chapter 6. Multithreaded Patterns -- Thread Pool -- Pool Size -- Dispatch Strategies -- Example Implementation -- Mutex: A Basic Lock -- Streaming Data with Ring Buffers -- Actor Model -- Pattern Nuances -- Relating to JavaScript -- Example Implementation -- Chapter 7. WebAssembly -- Your First WebAssembly -- Atomic Operations in WebAssembly -- Compiling C Programs to WebAssembly with Emscripten -- Other WebAssembly Compilers -- AssemblyScript 
505 8 |a Happycoin in AssemblyScript -- Chapter 8. Analysis -- When Not to Use -- Low Memory Constraints -- Low Core Count -- Containers Versus Threads -- When to Use -- Summary of Caveats -- Appendix A. Structured Clone Algorithm -- Index -- About the Authors -- Colophon 
590 |a O'Reilly  |b O'Reilly Online Learning: Academic/Public Library Edition 
700 1 |a English, Bryan,  |e author. 
710 2 |a Safari, an O'Reilly Media Company. 
856 4 0 |u https://learning.oreilly.com/library/view/~/9781098104429/?ar  |z Texto completo (Requiere registro previo con correo institucional) 
936 |a BATCHLOAD 
938 |a ProQuest Ebook Central  |b EBLB  |n EBL6734219 
994 |a 92  |b IZTAP