X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FPoolEmitter.html;h=9f198a49d7e73d7963024462b8e84c962ea65705;hb=b667be1103b9362ae29d094de05f812468464d4f;hp=810c3978ba8b1629313db7e1c9994abba3c0b7e9;hpb=f06d10306cf1bfffb90048cf6e96c8507cd0e916;p=poolifier.git diff --git a/docs/classes/PoolEmitter.html b/docs/classes/PoolEmitter.html index 810c3978..1341eeeb 100644 --- a/docs/classes/PoolEmitter.html +++ b/docs/classes/PoolEmitter.html @@ -1,4 +1,4 @@ -PoolEmitter | poolifier
+PoolEmitter | poolifier - v2.6.8
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.8
    -
    +
    • poolifier
    • @@ -17,15 +17,16 @@

      Class PoolEmitter

    Pool events emitter.

    -
    +
    +

    Hierarchy

      -
    • EventEmitter +
    • EventEmitter
      • PoolEmitter
    +
  • Defined in src/pools/pool.ts:50
  • @@ -33,466 +34,530 @@

    Constructors

    -
    - -
      - +
      + +
        +
      • Parameters

        • -
          Optional options: EventEmitterOptions
        -

        Returns PoolEmitter

    +

    Returns PoolEmitter

    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/events.d.ts:109
  • Properties

    -
    - -
    captureRejectionSymbol: typeof captureRejectionSymbol
    +
    + +
    captureRejections: boolean
    +

    Value: boolean

    +

    Change the default captureRejections option on all new EventEmitter objects.

    +
    +
    +

    Since

    v13.4.0, v12.16.0

    -
    - -
    defaultMaxListeners: number
    +
    + +
    defaultMaxListeners: number
    +

    By default, a maximum of 10 listeners can be registered for any single +event. This limit can be changed for individual EventEmitter instances +using the emitter.setMaxListeners(n) method. To change the default +for allEventEmitter instances, the events.defaultMaxListenersproperty can be used. If this value is not a positive number, a RangeErroris thrown.

    +

    Take caution when setting the events.defaultMaxListeners because the +change affects allEventEmitter instances, including those created before +the change is made. However, calling emitter.setMaxListeners(n) still has +precedence over events.defaultMaxListeners.

    +

    This is not a hard limit. The EventEmitter instance will allow +more listeners to be added but will output a trace warning to stderr indicating +that a "possible EventEmitter memory leak" has been detected. For any singleEventEmitter, the emitter.getMaxListeners() and emitter.setMaxListeners()methods can be used to +temporarily avoid this warning:

    +
    import { EventEmitter } from 'node:events';
    const emitter = new EventEmitter();
    emitter.setMaxListeners(emitter.getMaxListeners() + 1);
    emitter.once('event', () => {
    // do stuff
    emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
    }); +
    +

    The --trace-warnings command-line flag can be used to display the +stack trace for such warnings.

    +

    The emitted warning can be inspected with process.on('warning') and will +have the additional emitter, type, and count properties, referring to +the event emitter instance, the event's name and the number of attached +listeners, respectively. +Its name property is set to 'MaxListenersExceededWarning'.

    +
    +
    +

    Since

    v0.11.2

    +
    -
    - -
    errorMonitor: typeof errorMonitor
    -

    This symbol shall be used to install a listener for only monitoring 'error' -events. Listeners installed using this symbol are called before the regular -'error' listeners are called.

    -

    Installing a listener using this symbol does not change the behavior once an -'error' event is emitted, therefore the process will still crash if no +

  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/events.d.ts:370
  • +
    + +
    errorMonitor: typeof errorMonitor
    +

    This symbol shall be used to install a listener for only monitoring 'error'events. Listeners installed using this symbol are called before the regular'error' listeners are called.

    +

    Installing a listener using this symbol does not change the behavior once an'error' event is emitted. Therefore, the process will still crash if no regular 'error' listener is installed.

    +
    +
    +

    Since

    v13.6.0, v12.17.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/events.d.ts:319
  • Methods

    -
    - -
      - +
      + +
        +
      • Alias for emitter.on(eventName, listener).

        - -

        Since

        v0.1.26

        Parameters

        • -
          eventName: string | symbol
        • +
          eventName: string | symbol
        • -
          listener: ((...args: any[]) => void)
          +
          listener: ((...args) => void)
          • -
              -
            • (...args: any[]): void
            • +
                +
              • (...args): void
              • Parameters

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

        Returns void

    -

    Returns PoolEmitter

    +
    + + +

    Returns boolean

    +
    +

    Since

    v0.1.26

    +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + + +

    Returns number

    +
    +

    Since

    v3.2.0

    +
    -
    - -
    +
    + + +

    Returns Function[]

    +
    +

    Since

    v0.1.26

    +
    -
    - -
    +
    + + -

    Returns PoolEmitter

    -
    - -
    +
    + + -

    Returns PoolEmitter

    -
    - -
    +
    + + -

    Returns PoolEmitter

    -
    - -
    +
    + + -

    Returns PoolEmitter

    -
    - -
    +
    + + -

    Returns PoolEmitter

    -
    - -
    +
    + + +

    Returns Function[]

    +
    +

    Since

    v9.4.0

    +
    -
    - -
    +
    + + +

    Returns PoolEmitter

    +
    +

    Since

    v0.1.26

    +
    -
    - -
    +
    + + -

    Returns PoolEmitter

    -
    - -
    +
    + + +

    Returns PoolEmitter

    +
    +

    Since

    v0.3.5

    +
    -
    - -
    +
    + + +

    Returns Function[]

    +
    +

    Since

    v15.2.0, v14.17.0

    +
    -
    - -
    +
    + + -

    Returns number

    -
    - -
    +
    + + -

    Returns AsyncIterableIterator<any>

    -
    - -
    +
    + + +

    Returns Promise<any[]>

    +
    +

    Since

    v11.13.0, v10.16.0

    +
    - +
  • Defined in node_modules/.pnpm/@types+node@20.4.0/node_modules/@types/node/events.d.ts:189
  • +
  • Parameters

    • -
      emitter: _DOMEventTarget
    • +
      emitter: _DOMEventTarget
    • -
      eventName: string
    • +
      eventName: string
    • -
      Optional options: StaticEventEmitterOptions
    -

    Returns Promise<any[]>

  • +

    Returns Promise<any[]>

    -
    - -
    +
    + + -

    Returns void

    - +
    +
    +
    +

    On This Page

    - -
    +
  • constructor
  • +
  • captureRejectionSymbol
  • +
  • captureRejections
  • +
  • defaultMaxListeners
  • +
  • errorMonitor
  • +
  • addListener
  • +
  • emit
  • +
  • eventNames
  • +
  • getMaxListeners
  • +
  • listenerCount
  • +
  • listeners
  • +
  • off
  • +
  • on
  • +
  • once
  • +
  • prependListener
  • +
  • prependOnceListener
  • +
  • rawListeners
  • +
  • removeAllListeners
  • +
  • removeListener
  • +
  • setMaxListeners
  • +
  • getEventListeners
  • +
  • listenerCount
  • +
  • on
  • +
  • once
  • +
  • setMaxListeners
  • + +

    Generated using TypeDoc

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