X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=842c682e1c6ca46882a42ce47df365b6193d0dd0;hb=ab03ecdd9c195574f19dbed3b36641229c24f723;hp=c048f6f6d26cf39f0563493cec0eeffa622a122d;hpb=fec1c97860619dd6356803fee392205474010d5b;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index c048f6f6..842c682e 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,15 @@ -AbstractWorker | poolifier
+AbstractWorker | poolifier
-
+
-
+
+
  • Defined in src/worker/abstract-worker.ts:24
  • @@ -54,9 +56,10 @@

    Properties

    Methods

    @@ -81,7 +84,7 @@
      - +
    • Constructs a new poolifier worker.

      @@ -106,60 +109,58 @@

      Whether this is the main worker or not.

    • -
      fn: ((data: Data) => Response)
      +
      fn: WorkerFunction<Data, Response>

      Function processed by the worker when the pool's execution function is invoked.

      -
      -
        -
      • -
          -
        • (data: Data): Response
        • -
        • -
          -

          Parameters

          -
            -
          • -
            data: Data
          -

          Returns Response

    • +
  • -
    mainWorker: undefined | null | MainWorker
    +
    mainWorker: undefined | null | MainWorker

    Reference to main worker.

  • opts: WorkerOptions = ...

    Options for the worker.

  • -

    Returns AbstractWorker<MainWorker, Data, Response>

    Properties

    aliveInterval?: Timeout
    -

    Handler Id of the aliveInterval worker alive check.

    +

    Handler id of the aliveInterval worker alive check.

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

    Whether this is the main worker or not.

    +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    +
  • Defined in src/worker/abstract-worker.ts:32
  • -
    mainWorker: undefined | null | MainWorker
    -
    - - +
  • Defined in src/worker/abstract-worker.ts:50
  • +
    + +
    opts: WorkerOptions = ...

    Options for the worker.

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

    @@ -173,11 +174,11 @@

    Returns number

    +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:315
    • - +
    • Binds the given function to execute to this AsyncResource's scope.

      The returned function will have an asyncResource property referencing @@ -194,51 +195,40 @@ the AsyncResource to which the function is bound.

      Parameters

      • -
        fn: Func
        +
        fn: Func

        The function to bind to the current AsyncResource.

      -

      Returns Func & { asyncResource: AsyncResource }

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

      Check to see if the worker should be terminated, because its living too long.

      +

      Checks if the worker should be terminated, because its living too long.

      Returns void

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

      Check if the fn parameter is passed to the constructor.

      +

      Checks if the fn parameter is passed to the constructor.

      Parameters

      • -
        fn: ((data: Data) => Response)
        +
        fn: WorkerFunction<Data, Response>

        The function that should be defined.

        -
        -
          -
        • -
            -
          • (data: Data): Response
          • -
          • -
            -

            Parameters

            -
              -
            • -
              data: Data
            -

            Returns Response

      +

    Returns void

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

    +
  • Defined in src/worker/abstract-worker.ts:110
  • +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in src/worker/abstract-worker.ts:139
  • Returns string

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

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

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

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

    The receiver to be used for the function call.

  • Rest ...args: any[]

    Optional arguments to pass to the function.

  • -

    Returns Result

    +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:303
  • +
  • Defined in src/worker/abstract-worker.ts:151
  • +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:320
  • Parameters

    -

    Returns Func & { asyncResource: AsyncResource }

    +
    +
    -
    +
  • constructor
  • +
  • aliveInterval
  • +
  • isMain
  • +
  • lastTaskTimestamp
  • +
  • mainWorker
  • +
  • opts
  • +
  • asyncId
  • +
  • bind
  • +
  • checkAlive
  • +
  • checkFunctionInput
  • +
  • checkWorkerOptions
  • +
  • emitDestroy
  • +
  • getMainWorker
  • +
  • handleError
  • +
  • messageListener
  • +
  • run
  • +
  • runAsync
  • +
  • runInAsyncScope
  • +
  • sendToMainWorker
  • +
  • triggerAsyncId
  • +
  • bind
  • + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file