Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/poolifier/src/mod.ts>MessageValue

Fast and small web worker pool
Latest
interface MessageValue
implements Task<Data>
import { type MessageValue } from "https://deno.land/x/poolifier@v0.3.14/src/mod.ts";

Message object that is passed between main worker and worker.

Type Parameters

optional
Data = unknown
optional
ErrorData = unknown

Properties

readonly
optional
workerId: string

Worker id.

readonly
optional
kill:
| true
| "success"
| "failure"

Kill code.

readonly
optional
workerError: WorkerError<ErrorData>

Worker error.

readonly
optional
taskPerformance: TaskPerformance

Task performance.

readonly
optional
taskFunctionOperation: "add" | "remove" | "default"

Task function operation:

  • 'add' - Add a task function.
  • 'remove' - Remove a task function.
  • 'default' - Set a task function as default.
readonly
optional
taskFunctionOperationStatus: boolean

Whether the task function operation is successful or not.

readonly
optional
taskFunction: string

Task function serialized to string.

readonly
optional
taskFunctionName: string

Task function name.

readonly
optional
taskFunctionNames: string[]

Task function names.

readonly
optional
statistics: WorkerStatistics

Whether the worker computes the given statistics or not.

readonly
optional
ready: boolean

Whether the worker is ready or not.

readonly
optional
checkActive: boolean

Whether the worker starts or stops its activity check.

readonly
optional
port: MessagePort

Message port.