workerpool
Offload tasks to a pool of workers on node.js and in the browser
...The project provides an abstraction layer that allows developers to offload CPU-intensive operations to background workers without manually handling thread communication or lifecycle management. It supports task queuing, dynamic worker scaling, timeouts, transferable objects, and proxy-based APIs for interacting with worker functions as if they were local calls. workerpool is designed to improve application responsiveness and throughput in workloads involving heavy computation, data processing, or asynchronous execution. The library works across multiple environments, supporting Web Workers in browsers and Worker Threads or child processes in Node.js. ...