UNPKG

@mkpro118/semantic-change-detector

Version:

Semantic change detection for TypeScript and TSX code with GitHub Actions integration

14 lines 908 B
/** * Executes a list of tasks concurrently using a pool of worker threads. * This function is designed to parallelize CPU-intensive work across multiple cores. * * @param tasks An array of task data objects to be processed. Each object is passed as `workerData` to a worker. * @param workerScript The absolute path to the script that the worker threads will execute. * @param maxConcurrency The maximum number of tasks to run in parallel. Defaults to the number of CPU cores. * @param timeoutMs The maximum time in milliseconds to allow a worker to run before terminating it. Defaults to 2 minutes. * @returns A promise that resolves with an array of results from all worker tasks. */ export declare function mapConcurrent<T extends { filePath: string; }, R>(tasks: T[], workerScript: string, maxConcurrency?: number, timeoutMs?: number): Promise<R[]>; //# sourceMappingURL=concurrency.d.ts.map