UNPKG

node-worker-threads-pool

Version:

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

14 lines (13 loc) 352 B
/** * Detect if error is a Timeout error. */ export declare function isTimeoutError(err: Error): boolean; export declare class PromiseWithTimer<T = any> { private promise; private timeout; private timerId; private timeoutSymbol; constructor(p: Promise<T>, timeout: number); private createTimer; startRace(): Promise<T>; }