Interface MessageValue<MessageData, Data, MainWorker>Internal

Message object that is passed between main worker and worker.

Type Parameters

  • MessageData = unknown

    Type of data sent to and/or from the worker. This can only be serializable data.

  • Data = unknown

    Type of data sent to the worker. This can only be serializable data.

  • MainWorker extends ClusterWorker | MessagePort = ClusterWorker | MessagePort

    Type of main worker.

Hierarchy

  • Task<MessageData>
    • MessageValue

Properties

data?: MessageData

Task input data that will be passed to the worker.

id?: string

Message UUID.

kill?: 1 | "SOFT" | "HARD"

Kill code.

name?: string

Task name.

parent?: MainWorker

Reference to main worker.

statistics?: WorkerStatistics

Whether to compute the given statistics or not.

taskError?: TaskError<Data>

Task error.

taskPerformance?: TaskPerformance

Task performance.

timestamp?: number

Timestamp.

Generated using TypeDoc