parallel-es
Version:
Simple parallelization for EcmaScript
17 lines (16 loc) • 1.1 kB
TypeScript
import { IParallelEnvironment, IDefaultInitializedParallelOptions, IParallelOperation } from "../";
import { IParallelGenerator } from "../generator/parallel-generator";
import { IParallelChain } from "./parallel-chain";
/**
* Creates a new parallel chain
* @param generator the generator to use to generate the input data and split the work
* @param options the options to use
* @param operations the operations to perform
* @param TIn type of the elements generated by the generator
* @param TOut type of the elements resulting from this parallel chain
*/
export declare function createParallelChain<TIn, TOut>(generator: IParallelGenerator, options: IDefaultInitializedParallelOptions, operations?: IParallelOperation[]): IParallelChain<TIn, IParallelEnvironment, TOut>;
/**
* @param sharedEnv the available environment in the job
*/
export declare function createParallelChain<TIn, TEnv extends IParallelEnvironment, TOut>(generator: IParallelGenerator, options: IDefaultInitializedParallelOptions, sharedEnv: TEnv, operations?: IParallelOperation[]): IParallelChain<TIn, TEnv, TOut>;