Interface IConcurrencyWork<T, R>

Provides a work chain, based on concurrency, for operator concurrencyFork.

interface IConcurrencyWork<T, R> {
    onAsync?(i: AsyncIterable<T>): null | void | AsyncIterable<R>;
    onSync?(i: Iterable<T>): null | void | Iterable<R>;
}

Type Parameters

  • T
  • R

Methods

  • Invoked for asynchronous iterables only, to return a chain of operators for asynchronous processing.

    When nothing or null is returned, it redirects to the source iterable.

    Parameters

    • i: AsyncIterable<T>

    Returns null | void | AsyncIterable<R>

  • Invoked for synchronous iterables only, to return a chain of operators for synchronous processing.

    When nothing or null is returned, it redirects to the source iterable.

    Parameters

    • i: Iterable<T>

    Returns null | void | Iterable<R>