@volundr/threads
v0.9.2
Published
Worker thread pool for Volundr sharding
Maintainers
Readme
@volundr/threads
Worker thread pool for Volundr's multi-core sharding. More memory-efficient than process-based sharding.
Install
npm install @volundr/threadsUsage
Used internally by @volundr/gateway for worker thread sharding. Each shard runs in its own worker thread, sharing the same process memory for common data.
import { ThreadPool } from "@volundr/threads";
const pool = new ThreadPool({
workerScript: "./worker.js",
size: 4,
});
await pool.start();Part of Volundr
Most bots should use @volundr/client with shardCount: "auto" instead of using this directly.
License
ISC
