node-worker-threads-pool-ts
Version:
Simple worker threads pool using Node's worker_threads module. Compatible with ES6+ Promise, Typescript, Async/Await.
15 lines (12 loc) • 306 B
text/typescript
/**
* @typedef {import("./pool-worker").TaskConfig} TaskConfig
*/
import { TaskConfig } from "./pool-worker";
export class TaskContainer {
constructor(
public param: any,
public resolve: (value: any) => any,
public reject: (reason: any) => any,
public taskConfig: TaskConfig
) {}
}