From: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 15:53:49 +0000 (+0000) Subject: chore: generate documentation X-Git-Tag: v2.4.11~36 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8d1797ad15cb2d87ac3c9904ce6df3db45c0c742;p=poolifier.git chore: generate documentation --- diff --git a/docs/assets/style.css b/docs/assets/style.css index 668d0c15..da6c789f 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -6,8 +6,9 @@ --light-color-background-warning: #e6e600; --light-color-icon-background: var(--light-color-background); --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); --light-color-text: #222; - --light-color-text-aside: #707070; + --light-color-text-aside: #6e6e6e; --light-color-link: #1f70c2; --light-color-ts-project: #b111c9; @@ -45,6 +46,7 @@ --dark-color-warning-text: #222; --dark-color-icon-background: var(--dark-color-background-secondary); --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; --dark-color-text: #f5f5f5; --dark-color-text-aside: #dddddd; --dark-color-link: #00aff4; @@ -54,9 +56,9 @@ --dark-color-ts-namespace: var(--dark-color-ts-project); --dark-color-ts-enum: #f4d93e; --dark-color-ts-enum-member: var(--dark-color-ts-enum); - --dark-color-ts-variable: #4d68ff; + --dark-color-ts-variable: #798dff; --dark-color-ts-function: #9772ff; - --dark-color-ts-class: #61b0ff; + --dark-color-ts-class: #8ac4ff; --dark-color-ts-interface: #6cff87; --dark-color-ts-constructor: var(--dark-color-ts-class); --dark-color-ts-property: var(--dark-color-ts-variable); @@ -86,6 +88,7 @@ --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); @@ -126,6 +129,7 @@ --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); @@ -173,6 +177,7 @@ body { --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); --color-link: var(--light-color-link); @@ -211,6 +216,7 @@ body { --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); --color-link: var(--dark-color-link); @@ -689,7 +695,7 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-navigation a.current, .tsd-page-navigation a.current { - background: var(--color-accent); + background: var(--color-active-menu-item); } .tsd-navigation a:hover, .tsd-page-navigation a:hover { @@ -737,6 +743,7 @@ a.tsd-index-link { line-height: 1.25rem; display: inline-flex; align-items: center; + color: var(--color-text); } .tsd-accordion-summary, .tsd-accordion-summary a { diff --git a/docs/classes/AbstractPool.html b/docs/classes/AbstractPool.html index 3369cea5..735e6ebb 100644 --- a/docs/classes/AbstractPool.html +++ b/docs/classes/AbstractPool.html @@ -22,7 +22,7 @@

Type Parameters

Implements

@@ -121,7 +121,7 @@
    - +
  • Constructs a new poolifier pool.

    @@ -129,7 +129,7 @@

    Type Parameters

    • -

      Worker extends IWorker<Worker>

    • +

      Worker extends IWorker<Worker>

    • Data = unknown

    • @@ -146,17 +146,17 @@

      Path to the worker file.

    • -
      opts: PoolOptions<Worker>
      +
      opts: PoolOptions<Worker>

      Options for the pool.

    -

    Returns AbstractPool<Worker, Data, Response>

+
  • Defined in src/pools/abstract-pool.ts:75
  • Properties

    -
    emitter?: PoolEmitter
    +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

      @@ -166,31 +166,31 @@
    +
  • Defined in src/pools/abstract-pool.ts:42
  • -
    filePath: string
    +
    filePath: string

    Path to the worker file.

    +
  • Defined in src/pools/abstract-pool.ts:77
  • -
    numberOfWorkers: number
    +
    numberOfWorkers: number

    Number of workers that this pool should manage.

    +
  • Defined in src/pools/abstract-pool.ts:76
  • -
    opts: PoolOptions<Worker>
    +
    opts: PoolOptions<Worker>

    Options for the pool.

    +
  • Defined in src/pools/abstract-pool.ts:78
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...
    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...

    The execution response promise map.

    +
  • Defined in src/pools/abstract-pool.ts:52
  • -
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>

    Worker choice strategy context referencing a worker choice algorithm implementation.

    Default to a round robin algorithm.

    +
  • Defined in src/pools/abstract-pool.ts:62
  • -
    workerNodes: WorkerNode<Worker, Data>[] = []
    +
    workerNodes: WorkerNode<Worker, Data>[] = []

    Pool worker nodes.

    +
  • Defined in src/pools/abstract-pool.ts:39
  • Accessors

    @@ -228,7 +228,7 @@

    Returns boolean

    +
  • Defined in src/pools/abstract-pool.ts:296
  • +
  • Defined in src/pools/abstract-pool.ts:289
  • +
  • Defined in src/pools/abstract-pool.ts:195
  • +
  • Defined in src/pools/abstract-pool.ts:185
  • +
  • Defined in src/pools/abstract-pool.ts:180
  • Methods

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:389
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:477
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:378
  • +

    Returns TasksQueueOptions

    +
  • Defined in src/pools/abstract-pool.ts:276
  • +
  • Defined in src/pools/abstract-pool.ts:535
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:112
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:121
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:139
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:167
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:157
  • +
  • Defined in src/pools/abstract-pool.ts:422
  • +
  • Defined in src/pools/abstract-pool.ts:484
  • +
  • Defined in src/pools/abstract-pool.ts:468
  • +
  • Defined in src/pools/abstract-pool.ts:637
  • +
  • Defined in src/pools/abstract-pool.ts:341
  • Returns void | Promise<void>

    +
  • Defined in src/pools/abstract-pool.ts:355
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:254
  • +
    task: Task<Data>

    Returns number

    +
  • Defined in src/pools/abstract-pool.ts:633
  • +
  • Defined in src/pools/abstract-pool.ts:310
  • +
    task: Task<Data>

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:628
  • +
  • Defined in src/pools/abstract-pool.ts:303
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:645
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:653
  • +
  • Defined in src/pools/abstract-pool.ts:658
  • Returns number

    +
  • Defined in src/pools/abstract-pool.ts:211
  • -

    Returns undefined | TasksUsage

    +
  • Defined in src/pools/abstract-pool.ts:566
  • +
  • Defined in src/pools/abstract-pool.ts:298
  • +
  • Defined in src/pools/abstract-pool.ts:370
  • Returns number

    +
  • Defined in src/pools/abstract-pool.ts:580
  • Returns void

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:461
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:622
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:450
  • +
  • Defined in src/pools/abstract-pool.ts:266
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:218
  • +
  • Defined in src/pools/abstract-pool.ts:244
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:604
  • +
  • Defined in src/pools/abstract-pool.ts:552
  • +
  • Defined in src/pools/abstract-pool.ts:363
  • Returns number

    +
  • Defined in src/pools/abstract-pool.ts:641
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:507
  • Returns void

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

    +
  • Defined in src/worker/abstract-worker.ts:110
  • +
  • Defined in src/worker/abstract-worker.ts:139
  • 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
  • +
  • Defined in src/worker/abstract-worker.ts:151
  • diff --git a/docs/classes/CircularArray.html b/docs/classes/CircularArray.html index 0297f8fc..1da35377 100644 --- a/docs/classes/CircularArray.html +++ b/docs/classes/CircularArray.html @@ -30,7 +30,7 @@ +
  • Defined in src/circular-array.ts:8
  • @@ -95,7 +95,7 @@
      - +
    • Type Parameters

      @@ -109,15 +109,15 @@
      size: number = DEFAULT_CIRCULAR_ARRAY_SIZE
    • Rest ...items: T[]
    -

    Returns CircularArray<T>

    +
  • Defined in src/circular-array.ts:11
  • Properties

    -
    [unscopables]: {
        [unscopables]?: boolean;
        length?: boolean;
        [iterator]?: any;
        at?: any;
        concat?: any;
        copyWithin?: any;
        entries?: any;
        every?: any;
        fill?: any;
        filter?: any;
        find?: any;
        findIndex?: any;
        flat?: any;
        flatMap?: any;
        forEach?: any;
        includes?: any;
        indexOf?: any;
        join?: any;
        keys?: any;
        lastIndexOf?: any;
        map?: any;
        pop?: any;
        push?: any;
        reduce?: any;
        reduceRight?: any;
        reverse?: any;
        shift?: any;
        slice?: any;
        some?: any;
        sort?: any;
        splice?: any;
        toLocaleString?: any;
        toString?: any;
        unshift?: any;
        values?: any;
    }
    +
    [unscopables]: {
        [unscopables]?: boolean;
        length?: boolean;
        [iterator]?: any;
        at?: any;
        concat?: any;
        copyWithin?: any;
        entries?: any;
        every?: any;
        fill?: any;
        filter?: any;
        find?: any;
        findIndex?: any;
        flat?: any;
        flatMap?: any;
        forEach?: any;
        includes?: any;
        indexOf?: any;
        join?: any;
        keys?: any;
        lastIndexOf?: any;
        map?: any;
        pop?: any;
        push?: any;
        reduce?: any;
        reduceRight?: any;
        reverse?: any;
        shift?: any;
        slice?: any;
        some?: any;
        sort?: any;
        splice?: any;
        toLocaleString?: any;
        toString?: any;
        unshift?: any;
        values?: any;
    }

    Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

    @@ -125,12 +125,12 @@ when they will be absent when used in a 'with' statement.

    Type declaration

    -
    length: number
    +
    length: number

    Gets or sets the length of the array. This is a number one higher than the highest index in the array.

    -
    size: number
    +
  • Defined in src/circular-array.ts:9
  • -
    [species]: ArrayConstructor
    @@ -160,7 +160,7 @@ when they will be absent when used in a 'with' statement.

    +
  • Defined in src/circular-array.ts:36
  • -

    Returns CircularArray<T>

    +
  • Defined in src/circular-array.ts:76
  • Properties

    -
    aliveInterval?: Timeout
    +
    aliveInterval?: Timeout

    Handler id of the aliveInterval worker alive check.

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

    Whether this is the main worker or not.

    +
  • Defined in src/worker/abstract-worker.ts:48
  • -
    lastTaskTimestamp: number
    +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    +
  • Defined in src/worker/abstract-worker.ts:32
  • -
    mainWorker: undefined | null | Worker
    +
    mainWorker: undefined | null | Worker

    Reference to main worker.

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

    Options for the worker.

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

    +
  • Defined in src/worker/abstract-worker.ts:156
  • +
  • Defined in src/worker/abstract-worker.ts:139
  • +
  • Defined in src/worker/cluster-worker.ts:50
  • +
  • Defined in src/worker/abstract-worker.ts:89
  • +
  • Defined in src/worker/abstract-worker.ts:181
  • +
  • Defined in src/worker/abstract-worker.ts:208
  • +
  • Defined in src/worker/cluster-worker.ts:45
  • diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index 718b9db6..e4dbfd43 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -38,11 +38,11 @@ When the maximum number of workers is reached and workers are busy, an event is

    Hierarchy

    +
  • Defined in src/pools/cluster/dynamic.ts:16
  • @@ -99,7 +99,7 @@ When the maximum number of workers is reached and workers are busy, an event is
      - +
    • Constructs a new poolifier dynamic cluster pool.

      @@ -126,18 +126,18 @@ When the maximum number of workers is reached and workers are busy, an event is

      Path to an implementation of a ClusterWorker file, which can be relative or absolute.

    • -
      opts: ClusterPoolOptions = {}
      +
      opts: ClusterPoolOptions = {}

      Options for this dynamic cluster pool.

    -

    Returns DynamicClusterPool<Data, Response>

    +
  • Defined in src/pools/cluster/dynamic.ts:28
  • Properties

    -
    emitter?: PoolEmitter
    +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

      @@ -147,41 +147,41 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:42
  • -
    filePath: string
    +
    filePath: string

    Path to the worker file.

    +
  • Defined in src/pools/abstract-pool.ts:77
  • -
    max: number
    +
    max: number

    Maximum number of workers that can be created by this pool.

    +
  • Defined in src/pools/cluster/dynamic.ts:30
  • -
    numberOfWorkers: number
    +
    numberOfWorkers: number

    Number of workers that this pool should manage.

    +
  • Defined in src/pools/abstract-pool.ts:76
  • -
    opts: ClusterPoolOptions = {}
    +
    opts: ClusterPoolOptions = {}

    Options for this fixed cluster pool.

    +
  • Defined in src/pools/cluster/fixed.ts:53
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...
    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...

    The execution response promise map.

    +
  • Defined in src/pools/abstract-pool.ts:52
  • -
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>

    Worker choice strategy context referencing a worker choice algorithm implementation.

    Default to a round robin algorithm.

    +
  • Defined in src/pools/abstract-pool.ts:62
  • -
    workerNodes: WorkerNode<Worker, Data>[] = []
    +
    workerNodes: WorkerNode<Worker, Data>[] = []

    Pool worker nodes.

    +
  • Defined in src/pools/abstract-pool.ts:39
  • Accessors

    @@ -222,7 +222,7 @@ When the maximum number of workers is reached and workers are busy, an event is

    Returns boolean

    +
  • Defined in src/pools/cluster/dynamic.ts:48
  • +
  • Defined in src/pools/cluster/dynamic.ts:43
  • +
  • Defined in src/pools/abstract-pool.ts:195
  • +
  • Defined in src/pools/abstract-pool.ts:185
  • +
  • Defined in src/pools/cluster/dynamic.ts:38
  • Methods

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:389
  • +
  • Defined in src/pools/cluster/fixed.ts:93
  • +
  • Defined in src/pools/abstract-pool.ts:378
  • +
  • Defined in src/pools/abstract-pool.ts:422
  • +
  • Defined in src/pools/abstract-pool.ts:484
  • +
  • Defined in src/pools/cluster/fixed.ts:88
  • +
  • Defined in src/pools/abstract-pool.ts:341
  • +
  • Defined in src/pools/cluster/fixed.ts:69
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:254
  • +
  • Defined in src/pools/abstract-pool.ts:310
  • +
  • Defined in src/pools/abstract-pool.ts:303
  • +
  • Defined in src/pools/abstract-pool.ts:298
  • +
  • Defined in src/pools/cluster/fixed.ts:64
  • Returns void

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:80
  • Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:75
  • +
  • Defined in src/pools/abstract-pool.ts:266
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:218
  • +
  • Defined in src/pools/abstract-pool.ts:244
  • +
  • Defined in src/pools/cluster/fixed.ts:59
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:507
  • Returns Promise<void>

    +
  • Defined in src/pools/thread/fixed.ts:54
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:254
  • +
  • Defined in src/pools/abstract-pool.ts:310
  • +
  • Defined in src/pools/abstract-pool.ts:303
  • +
  • Defined in src/pools/abstract-pool.ts:298
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • Returns void

    +
  • Defined in src/pools/thread/fixed.ts:70
  • +
  • Defined in src/pools/thread/fixed.ts:62
  • +
  • Defined in src/pools/abstract-pool.ts:266
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:218
  • +
  • Defined in src/pools/abstract-pool.ts:244
  • +
  • Defined in src/pools/abstract-pool.ts:363
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:507
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:389
  • +
  • Defined in src/pools/cluster/fixed.ts:93
  • +
  • Defined in src/pools/abstract-pool.ts:378
  • +
  • Defined in src/pools/abstract-pool.ts:422
  • +
  • Defined in src/pools/abstract-pool.ts:484
  • +
  • Defined in src/pools/cluster/fixed.ts:88
  • +
  • Defined in src/pools/abstract-pool.ts:341
  • +
  • Defined in src/pools/cluster/fixed.ts:69
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:254
  • +
  • Defined in src/pools/abstract-pool.ts:310
  • +
  • Defined in src/pools/abstract-pool.ts:303
  • +
  • Defined in src/pools/abstract-pool.ts:298
  • +
  • Defined in src/pools/cluster/fixed.ts:64
  • Returns void

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:80
  • Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:75
  • +
  • Defined in src/pools/abstract-pool.ts:266
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:218
  • +
  • Defined in src/pools/abstract-pool.ts:244
  • +
  • Defined in src/pools/cluster/fixed.ts:59
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:507
  • Returns Promise<void>

    +
  • Defined in src/pools/thread/fixed.ts:54
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:254
  • +
  • Defined in src/pools/abstract-pool.ts:310
  • +
  • Defined in src/pools/abstract-pool.ts:303
  • +
  • Defined in src/pools/abstract-pool.ts:298
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • Returns void

    +
  • Defined in src/pools/thread/fixed.ts:70
  • +
  • Defined in src/pools/thread/fixed.ts:62
  • +
  • Defined in src/pools/abstract-pool.ts:266
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:218
  • +
  • Defined in src/pools/abstract-pool.ts:244
  • +
  • Defined in src/pools/abstract-pool.ts:363
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:507
  • -

    Returns PoolEmitter

    Returns void

    -

    Returns PoolEmitter

    - +
  • Parameters

    @@ -703,7 +703,7 @@ special handling:

      - +
    • const {
      setMaxListeners,
      EventEmitter
      } = require('events');

      const target = new EventTarget();
      const emitter = new EventEmitter();

      setMaxListeners(5, target, emitter);
      diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index e6f05b4a..33a4e3ae 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -40,11 +40,11 @@ but the minimum number of workers will be guaranteed.

      Hierarchy

      +
    • Defined in src/worker/thread-worker.ts:21
    @@ -83,7 +83,7 @@ but the minimum number of workers will be guaranteed.

      - +
    • Constructs a new poolifier thread worker.

      @@ -98,65 +98,65 @@ but the minimum number of workers will be guaranteed.

      Parameters

    -

    Returns ThreadWorker<Data, Response>

  • +
  • Defined in src/worker/thread-worker.ts:31
  • Properties

    -
    aliveInterval?: Timeout
    +
    aliveInterval?: Timeout

    Handler id of the aliveInterval worker alive check.

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

    Whether this is the main worker or not.

    +
  • Defined in src/worker/abstract-worker.ts:48
  • -
    lastTaskTimestamp: number
    +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    +
  • Defined in src/worker/abstract-worker.ts:32
  • -
    mainWorker: undefined | null | MessagePort
    +
    mainWorker: undefined | null | MessagePort

    Reference to main worker.

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

    Options for the worker.

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

      - +
    • Returns

      The unique asyncId assigned to the resource.

      @@ -168,7 +168,7 @@ but the minimum number of workers will be guaranteed.

        - +
      • Binds the given function to execute to this AsyncResource's scope.

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

        fn: Func

        The function to bind to the current AsyncResource.

      -

      Returns Func & {
          asyncResource: AsyncResource;
      }

    +
  • Defined in src/worker/abstract-worker.ts:156
    • - +
    • 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 @@ -215,14 +215,14 @@ never be called.

      Returns

      A reference to asyncResource.

      -

      Returns ThreadWorker<Data, Response>

    +
  • Defined in src/worker/abstract-worker.ts:139
  • +
  • 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 @@ -372,7 +372,7 @@ then restore the original execution context.

        - +
      • Sends a message to the main worker.

        @@ -380,17 +380,17 @@ then restore the original execution context.

        Parameters

      Returns void

    +
  • Defined in src/worker/thread-worker.ts:39
    • - +
    • Returns

      The same triggerAsyncId that is passed to the AsyncResource constructor.

      @@ -402,7 +402,7 @@ then restore the original execution context.

        - +
      • Binds the given function to the current execution context.

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

      • Optional thisArg: ThisArg
      -

      Returns Func & {
          asyncResource: AsyncResource;
      }

    diff --git a/docs/classes/WorkerChoiceStrategyContext.html b/docs/classes/WorkerChoiceStrategyContext.html index 8f75212a..897083c5 100644 --- a/docs/classes/WorkerChoiceStrategyContext.html +++ b/docs/classes/WorkerChoiceStrategyContext.html @@ -22,7 +22,7 @@

    Type Parameters

    @@ -66,7 +66,7 @@
    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:41
  • Properties

    -
    workerChoiceStrategies: Map<"ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN", IWorkerChoiceStrategy>
    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:29
  • -
    workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" = WorkerChoiceStrategies.ROUND_ROBIN
    +
    workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" = WorkerChoiceStrategies.ROUND_ROBIN

    The worker choice strategy.

    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:43
  • Methods

    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:122
  • +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:95
    • - +
    • Removes a worker node key from the worker choice strategy in the context.

      @@ -155,11 +155,11 @@

    Returns boolean

    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:136
  • +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:149
    • - +
    • Sets the worker choice strategy to use in the context.

      @@ -189,7 +189,7 @@

    Returns void

    +
  • Defined in src/pools/selection-strategies/worker-choice-strategy-context.ts:108
  • +
  • Defined in src/pools/pool.ts:188
  • -
    execute: ((data?) => Promise<Response>)
    +
    execute: ((data?) => Promise<Response>)

    Type declaration

      @@ -139,10 +139,10 @@

    Returns Promise<Response>

    +
  • Defined in src/pools/pool.ts:159
  • -
    findFreeWorkerNodeKey: (() => number)
    +
    findFreeWorkerNodeKey: (() => number)

    Type declaration

      @@ -158,10 +158,10 @@

    Returns number

    +
  • Defined in src/pools/pool.ts:152
  • -
    setTasksQueueOptions: ((tasksQueueOptions) => void)
    +
    setTasksQueueOptions: ((tasksQueueOptions) => void)

    Type declaration

    Returns void

    +
  • Defined in src/pools/pool.ts:197
  • -
    setWorkerChoiceStrategy: ((workerChoiceStrategy, workerChoiceStrategyOptions?) => void)
    +
    setWorkerChoiceStrategy: ((workerChoiceStrategy, workerChoiceStrategyOptions?) => void)

    Type declaration

    Returns void

    +
  • Defined in src/pools/pool.ts:170
  • -
    setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)
    +
    setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)

    Type declaration

    Returns void

    +
  • Defined in src/pools/pool.ts:179
  • -
    type: PoolType
    +
    type: PoolType

    Pool type.

    If it is 'dynamic', it provides the max property.

    +
  • Defined in src/pools/pool.ts:129
  • -
    workerNodes: WorkerNode<Worker, Data>[]
    +
    workerNodes: WorkerNode<Worker, Data>[]

    Pool worker nodes.

    +
  • Defined in src/pools/pool.ts:133
  • +
  • Defined in src/pools/worker.ts:105
  • Returns boolean

    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:85
  • -
    requiredStatistics: RequiredStatistics
    +
    requiredStatistics: RequiredStatistics

    Required tasks usage statistics.

    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:71
  • -
    reset: (() => boolean)
    +
    reset: (() => boolean)

    Type declaration

      @@ -97,10 +97,10 @@

    Returns boolean

    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:75
  • -
    setOptions: ((opts) => void)
    +
    setOptions: ((opts) => void)

    Type declaration

    Returns void

    +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:91
  • +
  • Defined in src/utility-types.ts:86
  • -
    worker: Worker
    +
    worker: Worker

    The worker handling the execution.

    +
  • Defined in src/utility-types.ts:94
  • +
  • Defined in src/utility-types.ts:11
  • +
  • Defined in src/pools/worker.ts:14
  • +
  • Defined in src/pools/worker.ts:27
  • +
  • Defined in src/worker/worker-options.ts:18
  • +
  • Defined in src/pools/worker.ts:6
  • +
  • Defined in src/pools/worker.ts:22
  • +
  • Defined in src/pools/pool.ts:48
  • +
  • Defined in src/pools/thread/fixed.ts:15
  • Returns Promise<Response>

    +
  • Defined in src/utility-types.ts:58
  • +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:30
  • +
  • Defined in src/utility-types.ts:68
  • Returns Response

    +
  • Defined in src/utility-types.ts:48
  • +
  • Defined in src/worker/worker-options.ts:4
  • +
  • Defined in src/pools/pool.ts:40
  • +
  • Defined in src/pools/selection-strategies/selection-strategies-types.ts:4