X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FTask.html;h=ff7b079771863ccea851a3cceef7888cb8a37258;hb=85de1563849907302a372b5da416e5cb15c23307;hp=285fef5f337a9cd5f6208fefcf5881823961be39;hpb=0de45de915a4d9feb7e1cb3b37bb416926a40b4b;p=poolifier.git diff --git a/docs/interfaces/Task.html b/docs/interfaces/Task.html index 285fef5f..ff7b0797 100644 --- a/docs/interfaces/Task.html +++ b/docs/interfaces/Task.html @@ -1,6 +1,6 @@ -Task | poolifier - v4.0.1

Interface Task<Data>Internal

Message object that is passed as a task between main worker and worker.

+Task | poolifier - v4.0.2

Interface Task<Data>Internal

Message object that is passed as a task between main worker and worker.

interface Task<Data> {
    data?: Data;
    name?: string;
    priority?: number;
    strategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN";
    taskId?: `${string}-${string}-${string}-${string}-${string}`;
    timestamp?: number;
    transferList?: readonly TransferListItem[];
}

Type Parameters

  • Data = unknown

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

    -

Hierarchy (view full)

Properties

Hierarchy (view full)

Properties

Properties

data?: Data

Task input data that will be passed to the worker.

-
name?: string

Task name.

-
priority?: number

Task priority. Lower values have higher priority.

+
name?: string

Task name.

+
priority?: number

Task priority. Lower values have higher priority.

Default Value

0
 
-
strategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

Task worker choice strategy.

-
taskId?: `${string}-${string}-${string}-${string}-${string}`

Task UUID.

-
timestamp?: number

Timestamp.

-
transferList?: readonly TransferListItem[]

Array of transferable objects.

-
\ No newline at end of file +
strategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

Task worker choice strategy.

+
taskId?: `${string}-${string}-${string}-${string}-${string}`

Task UUID.

+
timestamp?: number

Timestamp.

+
transferList?: readonly TransferListItem[]

Array of transferable objects.

+
\ No newline at end of file