
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
task-pool-coordinator
Advanced tools
高性能任务池调度器,支持最大并发、暂停/恢复、顺序控制、自动提交等功能。
npm install task-pool-coordinator
详见 type.ts:
export interface Task<Args extends any[] = [], T = any> {
args: Args
body: (...args: Args) => Promise<T>
handleDelete?: () => any
}
export type TaskRunning = Task & { seq: number, deleted?: boolean }
import { TaskPool } from 'task-pool-coordinator'
import type { Task } from 'task-pool-coordinator/type'
const tasks: Task[] = [
{
args: [1, 2],
body: async (a, b) => a + b,
},
{
args: [3, 4],
body: async (a, b) => a * b,
},
]
const tc = new TaskPool({
taskPool: tasks,
executor: (results) => {
console.log('全部完成', results)
},
concurrency: 2,
maintainOrder: true,
immediately: false,
})
tc.start()
dist/type.d.tsnpm run build
npm publish
taskPool: Task[] 任务数组executor: (results, crtResult?, crtIndex?, error?) => any 结果回调concurrency: number 最大并发数maintainOrder?: boolean 是否保持顺序immediately?: boolean 是否每个任务完成立即回调autoSubmit?: boolean 是否自动提交submit?: (results) => any 自动提交函数addTask(task: Task | Task[]) 添加任务deleteTask(seq: number) 删除任务start() 启动调度stop() 停止并清空setConcurrency(newConcurrency: number) 动态调整并发reset() 重置所有状态getStatus() 获取当前状态pause() 暂停调度resume() 恢复调度isPaused() 是否处于暂停setImmediately(newVal: boolean) 动态设置immediatelyFAQs
task pool coordinator
The npm package task-pool-coordinator receives a total of 9 weekly downloads. As such, task-pool-coordinator popularity was classified as not popular.
We found that task-pool-coordinator 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.