X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=67fa900bf1fa2ea2cfc5ba63b43406e0c5424647;hb=5decbf239157d04bdf38a642fe2757f565a8d466;hp=b990d6d71a845df243c6fdd9faa492de6510f1e3;hpb=938d9c678aa8e70e5642feffb90604cf25c993fe;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index b990d6d7..67fa900b 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -18,9 +18,9 @@

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

-
+

Type Parameters

-
+
  • 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,13 +86,13 @@
      - +
    • Constructs a new poolifier worker.

      -
      +

      Type Parameters

      -
        +
        • MainWorker extends Worker | MessagePort

        • @@ -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

    @@ -168,27 +177,24 @@
    +
  • 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:276
  • -

    Returns string

    +
  • 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 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
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • Generated using TypeDoc

    \ No newline at end of file