
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
thread-pool-ts
Advanced tools
基于 worker_threads 封装的轻量级线程池,支持:
npm install thread-pool-ts
# or
pnpm add thread-pool-ts
⚠️ 仅支持 Node.js 12+,不支持浏览器环境。
import { ThreadPool } from "thread-pool-ts";
const pool = new ThreadPool({
workerPath: "./worker.js", // Worker 文件路径
maxConcurrency: 4, // 最大并发数
isSequential: true, // 是否按顺序执行 onResult
timeout: 5000, // 每个任务超时时间(毫秒)
});
const tasks = ["任务1", "任务2", "任务3"];
pool.run<string, string>({
tasks,
onResult: (res, i) => {
console.log(`第 ${i} 个结果:`, res);
},
onComplete: (allResults) => {
console.log("所有任务完成:", allResults);
},
});
FAQs
基于 worker_threads 的通用线程池任务执行器(支持并发控制、顺序输出、超时终止)
We found that thread-pool-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.