X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=df85f6680ee4b5899780ee0f36af115abac21d0c;hb=fbc22127e53d3ec0ecbd38ecea25fb92ebef50e7;hp=6c2de6b9626f2ec5395f1a80e5f793ac82ad0502;hpb=9954c636f2caafac0b2bf0289059788679fd3053;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 6c2de6b9..df85f668 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,4 +1,4 @@ -AbstractWorker | poolifier
+AbstractWorker | poolifier

Returns void

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

    Returns void

    -
    +
  • Defined in src/worker/abstract-worker.ts:110
  • +
    -
      - +
        +
      • Call all destroy hooks. This should only ever be called once. An error will be thrown if it is called more than once. This must be manually called. If @@ -254,26 +254,26 @@ never be called.

        Returns

        A reference to asyncResource.

        -

        Returns AbstractWorker<MainWorker, Data, Response>

    -
    +
    -
      - +
        +
      • Returns the main worker.

        Returns

        Reference to the main worker.

        -

        Returns MainWorker

    -
    +
  • Defined in src/worker/abstract-worker.ts:139
  • +
    -
      - +
        +
      • Handles an error and convert it to a string so it can be sent back to the main worker.

        @@ -283,16 +283,16 @@ never be called.

        Parameters

        • -
          e: string | Error
          +
          e: string | Error

          The error raised by the worker.

        Returns string

    -
    +
  • Defined in src/worker/abstract-worker.ts:171
  • +
    -
    -
    +
  • Defined in src/worker/abstract-worker.ts:89
  • +
    -
    -
    +
  • Defined in src/worker/abstract-worker.ts:181
  • +
    -
    -
    +
  • Defined in src/worker/abstract-worker.ts:208
  • +
    -
      - +
        +
      • Call the provided function with the provided arguments in the execution context of the async resource. This will establish the context, trigger the AsyncHooks @@ -368,45 +368,45 @@ then restore the original execution context.

        Type Parameters

        • -

          This

        • +

          This

        • -

          Result

    +

    Result

    Parameters

    • -
      fn: ((this: This, ...args: any[]) => Result)
      +
      fn: ((this, ...args) => Result)

      The function to call in the execution context of this async resource.

      • -
          -
        • (this: This, ...args: any[]): Result
        • +
            +
          • (this, ...args): Result
          • Parameters

            • -
              this: This
            • +
              this: This
            • -
              Rest ...args: any[]
            -

            Returns Result

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

    Returns Result

  • -
    Optional thisArg: This
    +
    Optional thisArg: This

    The receiver to be used for the function call.

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

    Optional arguments to pass to the function.

  • -

    Returns Result

    +
    -
      - +
        +
      • Returns

        The same triggerAsyncId that is passed to the AsyncResource constructor.

        @@ -432,10 +432,10 @@ then restore the original execution context.

        Inherited from AsyncResource.triggerAsyncId

        • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:320
    -
    +
    -
      - +
        +
      • Binds the given function to the current execution context.

        The returned function will have an asyncResource property referencing @@ -447,23 +447,23 @@ the AsyncResource to which the function is bound.

        Type Parameters

        • -

          Func extends ((this: ThisArg, ...args: any[]) => any)

        • +

          Func extends ((this, ...args) => any)

        • -

          ThisArg

    +

    ThisArg

    Parameters

    • -
      fn: Func
      +
      fn: Func

      The function to bind to the current execution context.

    • -
      Optional type: string
      +
      Optional type: string

      An optional name to associate with the underlying AsyncResource.

    • -
      Optional thisArg: ThisArg
    -

    Returns Func & {
        asyncResource: AsyncResource;
    }