parallel-es
Version:
Simple parallelization for EcmaScript
24 lines (23 loc) • 1.42 kB
TypeScript
import { IParallelChainState, IParallelChainEnvironment, IScheduledParallelChainState } from "./parallel-chain-state";
import { IParallelOperation, IDefaultInitializedParallelOptions } from "../";
import { IParallelStream } from "../stream/parallel-stream";
import { ParallelEnvironmentDefinition } from "../parallel-environment-definition";
/**
* State of a parallel chain whose job has been scheduled on the thread pool (or even where the computation already has completed).
* @param TElement type of the elements produced by the stream
*/
export declare class ScheduledParallelChainState<TElement> implements IScheduledParallelChainState<TElement> {
private options;
private environment;
stream: IParallelStream<TElement[], TElement[]>;
/**
* Creates a new state that is based on the given stream
* @param stream the stream for the scheduled tasks
* @param options the options used for the scheduled job
* @param environment the environment used for the scheduled job
*/
constructor(stream: IParallelStream<TElement[], TElement[]>, options: IDefaultInitializedParallelOptions, environment: ParallelEnvironmentDefinition);
resolve(): IScheduledParallelChainState<TElement>;
chainOperation<TElementNew>(operation: IParallelOperation): IParallelChainState<TElementNew>;
addEnvironment(environment: IParallelChainEnvironment): IParallelChainState<TElement>;
}