X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=8b5d3d325dd55c13f829d6cf2400f48bc749cf70;hb=fbc22127e53d3ec0ecbd38ecea25fb92ebef50e7;hp=48dfe83b952cbd0d9165f335252bb39938c52f6d;hpb=699db3f06500e28320ae786e304c23020dd5b5ad;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index 48dfe83b..8b5d3d32 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,4 +1,4 @@ -ThreadWorker | poolifier
+ThreadWorker | poolifier

Returns void

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

    Returns void

    -
    +
  • 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 @@ -334,45 +334,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.

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

        Inherited from AbstractWorker.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 @@ -414,23 +414,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;
    }