Node.js · Middle · Question 51 of 75
What are worker threads for?
- ✓Correct answer: Running CPU-heavy JavaScript in parallel without blocking the main event loop
- 2Making file and network I/O faster
- 3Running several Express apps on different ports
Explanation
Each worker has its own V8 instance and event loop. Communicate with postMessage; large binary data can be transferred or shared with SharedArrayBuffer.