X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=151aa034a2abfc2e167919e358f8d238dbf5b581;hb=dab8c377b70fc962ec217f2aeb719842f9f94cd6;hp=f24250c6a91109585b820e571fe37710bc641d2a;hpb=396360a789e4806699533ddf899c79dc2b7ae868;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index f24250c6..151aa034 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -43,7 +43,7 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:26
  • @@ -60,21 +60,23 @@ lastTaskTimestamp mainWorker opts +taskFunctions

    Methods

    asyncId bind checkAlive -checkFunctionInput +checkTaskFunctions checkWorkerOptions emitDestroy getMainWorker +getTaskFunction handleError messageListener -run runAsync runInAsyncScope +runSync sendToMainWorker triggerAsyncId bind @@ -84,7 +86,7 @@
      - +
    • Constructs a new poolifier worker.

      @@ -109,8 +111,8 @@

      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
      @@ -123,7 +125,7 @@

      Returns AbstractWorker<MainWorker, Data, Response>

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

    @@ -132,35 +134,42 @@

    Handler id of the aliveInterval worker alive check.

    +
  • Defined in src/worker/abstract-worker.ts:42
  • isMain: boolean

    Whether this is the main worker or not.

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

    Timestamp of the last task processed by this worker.

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

    Reference to main worker.

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

    Options for the worker.

    +
  • Defined in src/worker/abstract-worker.ts:59
  • +
    + +
    taskFunctions: Map<string, WorkerFunction<Data, Response>>
    +

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

    +

    Methods

    @@ -173,15 +182,13 @@
    +
  • Defined in node_modules/.pnpm/@types+node@20.1.1/node_modules/@types/node/async_hooks.d.ts:312
  • -

    Returns Func & {
        asyncResource: AsyncResource;
    }

    +
  • Defined in node_modules/.pnpm/@types+node@20.1.1/node_modules/@types/node/async_hooks.d.ts:287
  • -
    - +
  • Defined in src/worker/abstract-worker.ts:179
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:98
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:86
  • +
  • Defined in node_modules/.pnpm/@types+node@20.1.1/node_modules/@types/node/async_hooks.d.ts:308
  • +
  • Defined in src/worker/abstract-worker.ts:162
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:194
  • Returns void

    -
    - -
    +
  • Defined in src/worker/abstract-worker.ts:138
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:231
  • +
  • Defined in node_modules/.pnpm/@types+node@20.1.1/node_modules/@types/node/async_hooks.d.ts:300
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:174
  • +
  • Defined in node_modules/.pnpm/@types+node@20.1.1/node_modules/@types/node/async_hooks.d.ts:317
  • -

    Returns Func & {
        asyncResource: AsyncResource;
    }

    +
  • Defined in node_modules/.pnpm/@types+node@20.1.1/node_modules/@types/node/async_hooks.d.ts:277
  • @@ -515,6 +535,7 @@ the AsyncResource to which the function is bound.

  • FixedClusterPool
  • FixedThreadPool
  • PoolEmitter
  • +
  • Queue
  • ThreadWorker
  • WorkerChoiceStrategyContext
  • ClusterPoolOptions
  • @@ -538,6 +559,7 @@ the AsyncResource to which the function is bound.

  • MessageHandler
  • OnlineHandler
  • PoolEvent
  • +
  • TaskFunctions
  • ThreadWorkerWithMessageChannel
  • WorkerAsyncFunction
  • WorkerChoiceStrategy