X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FTask.html;h=2695ec5725989ce7dd2b68f51aad4ee3b16a15ae;hb=67c6a853287d5c2df8ab115905b714e644333802;hp=35ea9207d38d804a882d60a83d9e725344bd9bae;hpb=ea2c5b8b3cee6a2d3915367d734c51628ef40551;p=poolifier.git diff --git a/docs/interfaces/Task.html b/docs/interfaces/Task.html index 35ea9207..2695ec57 100644 --- a/docs/interfaces/Task.html +++ b/docs/interfaces/Task.html @@ -1,6 +1,6 @@ -Task | poolifier - v4.0.8

Interface Task<Data>Internal

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

+Task | poolifier - v4.0.9

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