Piscina

A popular npm library that manages a pool of Node.js worker threads, queues tasks for them and returns each result as a promise.

In more detail

It handles minimum and maximum thread counts, task queue limits, timeouts and cancellation, so application code just calls pool.run(task). Its pools can also be closed gracefully, waiting for running tasks to finish.

Related terms

Taught in

References