X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=2040352d263a2b55892af561c6ac1c25cc02b5b3;hb=8d98e603c79d8d00b2b6a33e5f732701a7466234;hp=460aac9df0eb0d25f61fdfaa12a766b43df5de46;hpb=3dd69d8ee8aa2132fccb106720a9f5ae67b92cc8;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 460aac9d..2040352d 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -43,7 +43,7 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:29
  • @@ -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:55
  • Properties

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

    Handler id of the aliveInterval worker alive check.

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

    Whether this is the main worker or not.

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

    Timestamp of the last task processed by this worker.

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

    Reference to main worker.

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

    Options for the worker.

    +
  • Defined in src/worker/abstract-worker.ts:62
  • +
    + +
    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:182
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:101
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:89
  • +
  • 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:165
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:197
  • Returns void

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

    +
  • Defined in src/worker/abstract-worker.ts:240
  • +
  • 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:177
  • +
  • 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
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • Generated using TypeDoc

    \ No newline at end of file