Class ParallelChainImpl<TIn, TEnv, TOut>
Methods
Private _chain
-
Type parameters
Parameters
catch
- catch<TResult>(onrejected: function): Promise<TResult | TOut[]>
- catch(onrejected: function): Promise<TOut[]>
-
Type parameters
Parameters
-
onrejected: function
-
- (reason: any): TResult | PromiseLike<TResult>
-
Parameters
Returns TResult
|
PromiseLike<TResult>
Returns Promise<TResult | TOut[]>
-
Parameters
-
onrejected: function
-
- (reason: any): Array<TOut> | PromiseLike<Array<TOut>>
-
Parameters
Returns Array<TOut>
|
PromiseLike<Array<TOut>>
Returns Promise<TOut[]>
inEnvironment
-
Type parameters
Parameters
Returns IParallelChain<TIn, TEnv & TEnvNew, TOut>
map
-
Type parameters
Parameters
reduce
- reduce<TResult>(defaultValue: TResult, accumulator: function | IFunctionId, combiner?: undefined | function): IParallelStream<TResult[], TResult>
-
Type parameters
Parameters
-
defaultValue: TResult
-
accumulator: function | IFunctionId
-
Optional combiner: undefined | function
subscribe
- subscribe(onNext: function, onError?: undefined | function, onComplete?: undefined | function): IParallelStream<TOut[], TOut[]>
-
Parameters
-
onNext: function
-
- (subResult: TOut[], taskIndex: number, valuesPerWorker: number): void
-
Parameters
-
subResult: TOut[]
-
taskIndex: number
-
valuesPerWorker: number
Returns void
-
Optional onError: undefined | function
-
Optional onComplete: undefined | function
then
- then<TResult1, TResult2>(onfulfilled: function, onrejected: function): Promise<TResult2 | TResult1>
- then<TResult>(onfulfilled: function, onrejected: function): Promise<TResult>
- then<TResult>(onfulfilled: function): Promise<TResult>
- then<TResult>(onfulfilled?: undefined | function, onrejected?: undefined | function): Promise<TResult>
- then<TResult>(onfulfilled?: undefined | function, onrejected?: undefined | function): Promise<TResult>
-
Type parameters
Parameters
-
onfulfilled: function
-
- (value: TOut[]): TResult1 | PromiseLike<TResult1>
-
Parameters
Returns TResult1
|
PromiseLike<TResult1>
-
onrejected: function
-
- (reason: any): TResult2 | PromiseLike<TResult2>
-
Parameters
Returns TResult2
|
PromiseLike<TResult2>
Returns Promise<TResult2 | TResult1>
-
Type parameters
Parameters
-
onfulfilled: function
-
- (value: TOut[]): TResult | PromiseLike<TResult>
-
Parameters
Returns TResult
|
PromiseLike<TResult>
-
onrejected: function
-
- (reason: any): TResult | PromiseLike<TResult>
-
Parameters
Returns TResult
|
PromiseLike<TResult>
Returns Promise<TResult>
-
Type parameters
Parameters
-
onfulfilled: function
-
- (value: TOut[]): TResult | PromiseLike<TResult>
-
Parameters
Returns TResult
|
PromiseLike<TResult>
Returns Promise<TResult>
-
Type parameters
Parameters
-
Optional onfulfilled: undefined | function
-
Optional onrejected: undefined | function
Returns Promise<TResult>
-
Type parameters
Parameters
-
Optional onfulfilled: undefined | function
-
Optional onrejected: undefined | function
Returns Promise<TResult>
Implementation of a IParallelChain
The implementation uses an internal state (IParallelChainState) to distinguishes between a not yet scheduled job (PendingParallelChainState), a job that has been scheduled but potentially not yet completed (ScheduledParallelChainState) and a job that is waiting for another one to complete, but has not yet been scheduled (DependentParallelChainState).