A Crash Course on Worker Threads
summary
Node.js adds worker_threads (introduced in 10.5, stable in 12.11, use 12.15.0 for security fixes) and demonstrates concrete code: a one-file hello world, passing workerData, using parentPort.postMessage, and terminating with terminate() that returns a promise. The talk shows sharing/transferring ArrayBuffers and pooling, and measures performance: single-thread BFS ~14s, bi-directional ~3s, and two parallel workers under 700ms, with links to slides and repo.
AI-written summary · about
chapters (5)
- 0:00Start
- 1:18UCSF Library
- 4:25Web Workers
- 4:50JavaScript is single-threaded
- 26:06PALACE FAMILY STEAK HOUSE
related talks
27mA Crash Course On Worker Threads
35mNodeJS: from single thread to worker threads
33mNode.js: The Road to Workers
28mNode.js: The Road to Workers
34mNode.js: The Road to Workers
30mParallel Universes: Node.js
13mConcurrency vs Parallelism in Node.js: Understanding the Event Loop & Worker Threads
52mShared Memory in Multithreaded Node.js
