X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FTask.html;h=3d0ef9a7a1d9093601c2d404bebc1cfa79ba71b1;hb=224d008191f52fa20b93e1ba67919569f8d6e315;hp=787abddbf51af0f61a5a4bd01e8dc4f3f37ab41f;hpb=dea42379cfdbcf1c1c9800df7c097eab484ebc07;p=poolifier.git diff --git a/docs/interfaces/Task.html b/docs/interfaces/Task.html index 787abddb..3d0ef9a7 100644 --- a/docs/interfaces/Task.html +++ b/docs/interfaces/Task.html @@ -1,19 +1,20 @@ -Task | poolifier - v4.0.15

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

data? +Task | poolifier - v4.0.15

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

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.

-

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 +

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.

+
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