piscinajs/piscina

Public

A fast, efficient Node.js Worker Thread Pool implementation

  • Stars5.2k+7 tuần này
  • Forks179
  • Watchers28
  • Issues9
  • Ngày tạo08/04/2020
  • Cập nhật gần nhất31/10/2026
  • Ngôn ngữTypeScript
  • Giấy phép—
README.md97.4 KBRaw

Piscina Logo

piscina - the node.js worker pool

CI

  • ✔ Fast communication between threads
  • ✔ Covers both fixed-task and variable-task scenarios
  • ✔ Supports flexible pool sizes
  • ✔ Proper async tracking integration
  • ✔ Tracking statistics for run and wait times
  • ✔ Cancellation Support
  • ✔ Supports enforcing memory resource limits
  • ✔ Supports CommonJS, ESM, and TypeScript
  • ✔ Custom task queues
  • ✔ Optional CPU scheduling priorities on Linux

Written in TypeScript.

For Node.js 24.x and higher.

MIT Licensed.

Documentation

Piscina API

Example

In main.js:

const path = require("path");
const Piscina = require("piscina");

const piscina = new Piscina({
  filename: path.resolve(__dirname, "worker.js"),
});

(async function () {
  const result = await piscina.run

Nội dung README thuộc về piscinajs và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/piscinajs/piscina