X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=f36ce844060615ddc3518fec3c6d085b0faf3983;hb=be71219a2e687e8a46a167503df4f5620807db0b;hp=85ce5f923e7f201eedb0bf2af874cdf0d9688068;hpb=84d0f4f2937987e5adbb8cfa94839eaf050c7502;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 85ce5f92..f36ce844 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,4 +1,4 @@ -AbstractWorker | poolifier - v2.6.9
+AbstractWorker | poolifier - v2.6.36
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.9
+
  • The search index is not available
  • poolifier - v2.6.36
    @@ -47,7 +47,7 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:49
  • @@ -59,38 +59,48 @@

    Properties

    -

    Methods

    -
    @@ -98,7 +108,7 @@
      - +
    • Constructs a new poolifier worker.

      @@ -106,7 +116,7 @@

      Type Parameters

      • -

        MainWorker extends Worker | MessagePort

      • +

        MainWorker extends MessagePort | Worker

      • Data = unknown

      • @@ -117,43 +127,38 @@
      • type: string

        The type of async event.

        -
        -
      • +
      • isMain: boolean

        Whether this is the main worker or not.

        -
        -
      • -
      • -
        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: MainWorker

        Reference to main worker.

        -
        -
      • +
      • -
        opts: WorkerOptions = ...
        +
        taskFunctions: TaskFunction<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.

        +
      • +
      • +
        opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

        Options for the worker.

        -
        -
      +

    Returns AbstractWorker<MainWorker, Data, Response>

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

    -
    - -
    aliveInterval?: Timeout
    -

    Handler id of the aliveInterval worker alive check.

    +
    + +
    activeInterval?: Timeout
    +

    Handler id of the activeInterval worker activity check.

    +
  • Defined in src/worker/abstract-worker.ts:73
  • id: number
    @@ -161,7 +166,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:57
  • isMain: boolean
    @@ -169,7 +174,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -177,23 +182,23 @@
    -
    - +
  • Defined in src/worker/abstract-worker.ts:65
  • +
    +
    mainWorker: MainWorker

    Reference to main worker.

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

    Options for the worker.

    +
  • Defined in src/worker/abstract-worker.ts:88
  • statistics: WorkerStatistics
    @@ -201,17 +206,47 @@
    +
  • Defined in src/worker/abstract-worker.ts:69
  • -
    taskFunctions: Map<string, WorkerFunction<Data, Response>>
    +
    taskFunctions: Map<string, TaskFunction<Data, Response>>

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

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

    +
    + +
      @@ -222,15 +257,20 @@
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:306
  • +
  • Defined in src/worker/abstract-worker.ts:568
  • +

    Returns Func

    Since

    v14.8.0, v12.19.0

    -
    - +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:283
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:412
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:592
  • +
    + +

    Returns void

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

    +
  • Defined in src/worker/abstract-worker.ts:101
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:302
  • Returns TaskPerformance

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

    Returns WorkerFunction<Data, Response>

    +
    +

    Parameters

    +
      +
    • +
      message: MessageValue<Data, unknown>
      +

      The kill message.

      +
    +

    Returns void

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

    Returns string

    The error message.

    +
    +

    Parameters

    +
      +
    • +
      name: string
      +

      The name of the task function to check.

      +
    +

    Returns boolean

    Whether the worker has a task function with the given name or not.

    + +
    +

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string or an empty string.

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

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:533
  • Optional thisArg: This

    The receiver to be used for the function call.

    -
    -
  • +Optional
  • Rest ...args: any[]

    Optional arguments to pass to the function.

    -
    -
  • +Rest

    Returns Result

    Since

    v9.6.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:294
  • +
    + +

    Returns void

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

    Returns void

    -
    - +
  • Defined in src/worker/abstract-worker.ts:438
  • +
    + +
    +
    +
    -
    - +
  • Defined in src/worker/abstract-worker.ts:391
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:402
  • -
    - -
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:598
  • +
    Optional thisArg: ThisArg
    Optional

    Returns Func

    Since

    v14.8.0, v12.19.0

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

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file