Interface MessageValue<Data, ErrorData>Internal

Message object that is passed between main worker and worker.

Type Parameters

  • Data = unknown

    Type of data sent to the worker or execution response. This can only be structured-cloneable data.

  • ErrorData = unknown

    Type of data sent to the worker triggering an error. This can only be structured-cloneable data.

Hierarchy

  • Task<Data>
    • MessageValue

Properties

checkAlive?: boolean

Whether the worker starts or stops its aliveness check.

data?: Data

Task input data that will be passed to the worker.

id?: string

Message UUID.

kill?: true | "SOFT" | "HARD"

Kill code.

name?: string

Task name.

ready?: boolean

Whether the worker is ready or not.

statistics?: WorkerStatistics

Whether the worker computes the given statistics or not.

taskError?: TaskError<ErrorData>

Task error.

taskPerformance?: TaskPerformance

Task performance.

timestamp?: number

Timestamp.

workerId?: number

Worker id.

Generated using TypeDoc