X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=ff7878f0b7e8b6b16d6551605d12b7ca51350006;hb=da66e34cda2cbcb3a94865d24696c668f50a1437;hp=0c22722b96bf9a41becf44dc0b8b7c85a7cdf5be;hpb=8d98e603c79d8d00b2b6a33e5f732701a7466234;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 0c22722b..ff7878f0 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,13 +1,13 @@ -IPool | poolifier
+IPool | poolifier - v2.6.45
-
+
  • The search index is not available
  • poolifier - v2.6.45 +
    @@ -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:205
  • - +

    Properties

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

    Type declaration

    @@ -72,27 +79,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:262
  • - +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

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

    Type declaration

    @@ -101,31 +113,34 @@
    +
  • Defined in src/pools/pool.ts:293
  • - -
    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.

    -
    +
    + +
    hasWorkerNodeBackPressure: ((workerNodeKey) => boolean)
    +
    +

    Type declaration

    +
    +
  • Defined in src/pools/pool.ts:227
  • - +
    info: PoolInfo

    Pool information.

    -
    +
  • Defined in src/pools/pool.ts:213
  • +
    + +
    listTaskFunctions: (() => string[])
    +
    +

    Type declaration

    +
    - +
    setTasksQueueOptions: ((tasksQueueOptions) => void)

    Type declaration

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

    Type declaration

    +
  • Optional workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

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

    Type declaration

    -

    Returns void

    +
  • Defined in src/pools/pool.ts:284
  • +
    + +
    start: (() => void)
    +
    +

    Type declaration

    +
    - -
    workerNodes: WorkerNode<Worker, Data>[]
    + +
    workerNodes: IWorkerNode<Worker, Data>[]

    Pool worker nodes.

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

    On This Page

    +

    On This Page

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

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file