UNPKG

node-worker-threads-pool

Version:

Simple worker threads pool using Node's worker_threads module. Compatible with ES6+ Promise, Async/Await.

16 lines (15 loc) 464 B
import { TransferList } from './types'; declare type ResolveFunc = (value: any) => void; declare type RejectFunc = (reason: any) => void; export interface TaskConfig { timeout?: number; transferList?: TransferList; } export declare class TaskContainer { param: any; resolve: ResolveFunc; reject: RejectFunc; taskConfig: TaskConfig; constructor(param: any, resolve: ResolveFunc, reject: RejectFunc, taskConfig: TaskConfig); } export {};