X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=b1134c0258f8f3382de1f4fc5cf85afb20a8c81a;hb=70353024c44987c467dadcec306c699ce4ae1f06;hp=460aac9df0eb0d25f61fdfaa12a766b43df5de46;hpb=557991e8ddb66a72a47d62606e142e8be86677f2;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 460aac9d..b1134c02 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.2.5/node_modules/@types/node/async_hooks.d.ts:306
  • -

    Returns Func & {
        asyncResource: AsyncResource;
    }

    +
  • Defined in node_modules/.pnpm/@types+node@20.2.5/node_modules/@types/node/async_hooks.d.ts:283
  • -
    - +
  • 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.2.5/node_modules/@types/node/async_hooks.d.ts:302
  • +
  • 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:233
  • +
  • Defined in node_modules/.pnpm/@types+node@20.2.5/node_modules/@types/node/async_hooks.d.ts:294
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:174
  • +
  • Defined in node_modules/.pnpm/@types+node@20.2.5/node_modules/@types/node/async_hooks.d.ts:311
  • -

    Returns Func & {
        asyncResource: AsyncResource;
    }

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

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