X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=c544fca00d13c053a2729753e25234b188106419;hb=a6b5c73ccccb3ef0ccc24ad462182e3cacee77b4;hp=98e014b8986bdd267c3f3c5f46993d4baeb1937a;hpb=4703c53b33791724a31462d7c6dabd43b0385f7c;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 98e014b8..c544fca0 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,4 +1,4 @@ -AbstractWorker | poolifier
+AbstractWorker | poolifier - v2.6.9
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.9
    @@ -17,22 +17,26 @@

    Class AbstractWorker<MainWorker, Data, Response>Abstract

    Base class that implements some shared logic for all poolifier workers.

    -
    +
    +

    Type Parameters

    +

    Type of response the worker sends back to the main worker. This can only be structured-cloneable data.

    +
    +

    Hierarchy

    +
  • Defined in src/worker/abstract-worker.ts:34
  • @@ -51,40 +55,49 @@

    Constructors

    - +
      - +
    • Constructs a new poolifier worker.

      @@ -103,87 +116,126 @@
    • type: string

      The type of async event.

      -
    • + +
    • isMain: boolean

      Whether this is the main worker or not.

      -
    • + +
    • -
      fn: WorkerFunction<Data, Response>
      -

      Function processed by the worker when the pool's execution function is invoked.

      -
    • +
      taskFunctions: WorkerFunction<Data, Response> | TaskFunctions<Data, Response>
      +

      Task function(s) processed by the worker when the pool's execution function is invoked. The first function is the default function.

      +
      +
    • -
      mainWorker: undefined | null | MainWorker
      +
      mainWorker: MainWorker

      Reference to main worker.

      -
    • + +
    • opts: WorkerOptions = ...

      Options for the worker.

      -
    -

    Returns AbstractWorker<MainWorker, Data, Response>

    +
  • Defined in src/worker/abstract-worker.ts:68
  • Properties

    - +
    aliveInterval?: Timeout

    Handler id of the aliveInterval worker alive check.

    -
    +
  • Defined in src/worker/abstract-worker.ts:58
  • +
    + +
    id: number
    +

    Worker id.

    +
    +
    - +
    isMain: boolean

    Whether this is the main worker or not.

    -
    +
  • Defined in src/worker/abstract-worker.ts:70
  • - +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:50
  • - -
    mainWorker: undefined | null | MainWorker
    + +
    mainWorker: MainWorker

    Reference to main worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:74
  • - +
    opts: WorkerOptions = ...

    Options for the worker.

    -
    +
    + +
    statistics: WorkerStatistics
    +

    Performance statistics computation requirements.

    +
    +
    +
    + +
    taskFunctions: Map<string, WorkerFunction<Data, Response>>
    +

    Task function(s) processed by the worker when the pool's execution function is invoked.

    +
    +
    +
  • Defined in src/worker/abstract-worker.ts:46
  • Methods

    - +
      - +
    • -

      Returns number

      The unique asyncId assigned to the resource.

      -
    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/async_hooks.d.ts:306
  • +
    + +
    - + -

    Returns Func & {
        asyncResource: AsyncResource;
    }

    -
    - -
    +
    + +
    +
    + +
    -
    - +
  • Defined in src/worker/abstract-worker.ts:346
  • +
    + +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:107
  • - +

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:95
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/async_hooks.d.ts:302
  • +
    + +
    - +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:314
  • - + -

    Returns string

    Message of the error.

    -
    +
  • Defined in src/worker/abstract-worker.ts:227
  • - +
    -
    - - +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:147
  • - + -

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:274
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/async_hooks.d.ts:294
  • +
    + +
    - + +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:217
  • +
    + +
    +
    + +
    - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/async_hooks.d.ts:311
  • - + -

    Returns Func & {
        asyncResource: AsyncResource;
    }

    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/async_hooks.d.ts:277
  • +
  • constructor
  • +
  • aliveInterval
  • +
  • id
  • +
  • isMain
  • +
  • lastTaskTimestamp
  • +
  • mainWorker
  • +
  • opts
  • +
  • statistics
  • +
  • taskFunctions
  • +
  • asyncId
  • +
  • beginTaskPerformance
  • +
  • bind
  • +
  • checkAlive
  • +
  • checkStatistics
  • +
  • checkTaskFunctions
  • +
  • checkWorkerOptions
  • +
  • emitDestroy
  • +
  • endTaskPerformance
  • +
  • getMainWorker
  • +
  • getTaskFunction
  • +
  • handleError
  • +
  • messageListener
  • +
  • runAsync
  • +
  • runInAsyncScope
  • +
  • runSync
  • +
  • sendToMainWorker
  • +
  • startCheckAlive
  • +
  • stopCheckAlive
  • +
  • triggerAsyncId
  • +
  • bind
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • Queue
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • EventLoopUtilizationMeasurementStatistics
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • IWorkerNode
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerInfo
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file