X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=d6e44aaa5dbac3bc8406be38c9a3951c5d51c281;hb=0e502832d98443e291ea5558423ca0de86b96e13;hp=93f4694004b0290113fc74ab1cb6a676cc29565e;hpb=5decbf239157d04bdf38a642fe2757f565a8d466;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 93f46940..d6e44aaa 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,13 +1,13 @@ -IPool | poolifier
+IPool | poolifier - v2.6.42
-
+
  • The search index is not available
  • poolifier - v2.6.42 +
    @@ -17,22 +17,26 @@

    Interface IPool<Worker, Data, Response>

    Contract definition for a poolifier pool.

    -
    +
    +

    Type Parameters

    +
  • Data = unknown

    -

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

    -
  • +

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

    +
    +
  • Response = unknown

    -

    Type of execution response. This can only be serializable data.

    -
  • +

    Type of execution response. This can only be structured-cloneable data.

    +
    +

    Hierarchy

    +
  • Defined in src/pools/pool.ts:182
  • - +

    Properties

    - +
    destroy: (() => Promise<void>)

    Type declaration

    @@ -72,27 +78,32 @@
    • (): Promise<void>
    • -

      Shutdowns every current worker in this pool.

      +

      Terminates all workers in this pool.

      -

      Returns Promise<void>

    +
  • Defined in src/pools/pool.ts:235
  • - +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

    -
    +
  • Defined in src/pools/pool.ts:218
  • - +
    enableTasksQueue: ((enable, tasksQueueOptions?) => void)

    Type declaration

    @@ -101,31 +112,34 @@
    +
  • Defined in src/pools/pool.ts:266
  • - -
    execute: ((data?, name?) => Promise<Response>)
    + +
    execute: ((data?, name?, transferList?) => Promise<Response>)

    Type declaration

    +

    The optional name of the task function to execute. If not specified, the default task function will be executed.

    +
    +
    +
  • +
    Optional transferList: TransferListItem[]
    +

    An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the pool's worker_threads worker and they should not be used in the main thread afterwards.

    +
    +
  • Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    -
    +
  • Defined in src/pools/pool.ts:227
  • +
    + +
    hasWorkerNodeBackPressure: ((workerNodeKey) => boolean)
    +
    +

    Type declaration

    +
    - +
    info: PoolInfo

    Pool information.

    -
    +
    + +
    listTaskFunctions: (() => string[])
    +
    +

    Type declaration

    +
    +
  • Defined in src/pools/pool.ts:241
  • - +
    setTasksQueueOptions: ((tasksQueueOptions) => void)

    Type declaration

    +
  • Defined in src/pools/pool.ts:275
  • - +
    setWorkerChoiceStrategy: ((workerChoiceStrategy, workerChoiceStrategyOptions?) => void)

    Type declaration

    +
  • Optional workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

    +
  • Defined in src/pools/pool.ts:248
  • - +
    setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)

    Type declaration

    -

    Returns void

    +
  • Defined in src/pools/pool.ts:257
  • - -
    workerNodes: WorkerNode<Worker, Data>[]
    + +
    workerNodes: IWorkerNode<Worker, Data>[]

    Pool worker nodes.

    -
    +
  • Defined in src/pools/pool.ts:196
  • -

    On This Page

    +

    On This Page

    +
  • destroy
  • +
  • emitter
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • hasWorkerNodeBackPressure
  • +
  • info
  • +
  • listTaskFunctions
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • workerNodes
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file