batch-cluster
    Preparing search index...

    Class Task<T>

    Tasks embody individual jobs given to the underlying child processes. Each instance has a promise that will be resolved or rejected based on the result of the task.

    Type Parameters

    • T = unknown
    Index

    Constructors

    • Type Parameters

      • T = unknown

      Parameters

      • command: string

        is the value written to stdin to perform the given task.

      • parser: Parser<T>

        is used to parse resulting data from the underlying process to a typed object.

      Returns Task<T>

    Properties

    command: string

    is the value written to stdin to perform the given task.

    parser: Parser<T>

    is used to parse resulting data from the underlying process to a typed object.

    taskId: number = ...

    Accessors

    • get promise(): Promise<T>

      Returns Promise<T>

      the resolution or rejection of this task.

    • get runtimeMs(): undefined | number

      Returns undefined | number

    Methods

    • Parameters

      • buf: string | Buffer<ArrayBufferLike>

      Returns void

    • Parameters

      • buf: string | Buffer<ArrayBufferLike>

      Returns void

    • Parameters

      • error: Error

      Returns boolean

      true if the wrapped promise was rejected