X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FPoolEmitter.html;h=37de8fde1cb99b6e8ba5a959d3f2b8d1fc1cb830;hb=0e16e60a89029abe61cda7ba293c036298cced05;hp=33034a59d7aa2c38b1cad4c6e06045bfb652e75c;hpb=6b83e544b1827a8a04898c3032dab73fe19687e6;p=poolifier.git diff --git a/docs/classes/PoolEmitter.html b/docs/classes/PoolEmitter.html index 33034a59..37de8fde 100644 --- a/docs/classes/PoolEmitter.html +++ b/docs/classes/PoolEmitter.html @@ -1,4 +1,4 @@ -PoolEmitter | poolifier - v2.6.23
+PoolEmitter | poolifier - v2.6.26
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.23
+
  • The search index is not available
  • poolifier - v2.6.26
    @@ -26,7 +26,7 @@
    • PoolEmitter
    +
  • Defined in src/pools/pool.ts:39
  • @@ -60,6 +60,7 @@ removeAllListeners removeListener setMaxListeners +addAbortListener getEventListeners getMaxListeners listenerCount @@ -82,7 +83,7 @@

    Returns PoolEmitter

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

    @@ -96,7 +97,7 @@
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:390
  • captureRejections: boolean
    @@ -108,7 +109,7 @@
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:397
  • defaultMaxListeners: number
    @@ -139,7 +140,7 @@ Its name property is set to 'MaxListenersExceededWarning&
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:434
  • errorMonitor: typeof errorMonitor
    @@ -152,7 +153,7 @@ regular 'error' listener is installed.

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

    @@ -186,7 +187,7 @@ regular 'error' listener is installed.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:454
    • @@ -211,7 +212,7 @@ to each.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:716
    • @@ -228,7 +229,7 @@ listeners. The values in the array are strings or Symbols.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:779
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:631
    • @@ -272,7 +273,7 @@ in the list of the listeners of the event.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:725
    • @@ -293,7 +294,7 @@ in the list of the listeners of the event.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:644
    • @@ -325,7 +326,7 @@ in the list of the listeners of the event.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:604
    • @@ -373,7 +374,7 @@ event listener to the beginning of the listeners array.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:486
    • @@ -419,7 +420,7 @@ event listener to the beginning of the listeners array.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:516
    • @@ -463,7 +464,7 @@ times.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:743
    • @@ -505,7 +506,7 @@ listener is removed, and then invoked.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:759
    • @@ -527,7 +528,7 @@ including any wrappers (such as those created by .once()).

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:675
    • @@ -550,7 +551,7 @@ component or module (e.g. sockets or file streams).

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:615
    • @@ -604,7 +605,7 @@ recently added instance. In the example the once('ping')lis
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:599
    • @@ -627,7 +628,51 @@ modified for this specific EventEmitter instance. The value can be
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:625
  • +
    + +
      + +
    • Experimental +

      Listens once to the abort event on the provided signal.

      +

      Listening to the abort event on abort signals is unsafe and may +lead to resource leaks since another third party with the signal can +call e.stopImmediatePropagation(). Unfortunately Node.js cannot change +this since it would violate the web standard. Additionally, the original +API makes it easy to forget to remove listeners.

      +

      This API allows safely using AbortSignals in Node.js APIs by solving these +two issues by listening to the event such that stopImmediatePropagation does +not prevent the listener from running.

      +

      Returns a disposable so that it may be unsubscribed from more easily.

      +
      import { addAbortListener } from 'node:events';

      function example(signal) {
      let disposable;
      try {
      signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
      disposable = addAbortListener(signal, (e) => {
      // Do something when signal is aborted.
      });
      } finally {
      disposable?.[Symbol.dispose]();
      }
      } +
      +
      +
      +

      Parameters

      +
        +
      • +
        signal: AbortSignal
      • +
      • +
        resource: ((event) => void)
        +
          +
        • +
            +
          • (event): void
          • +
          • +
            +

            Parameters

            +
              +
            • +
              event: Event
            +

            Returns void

      +

      Returns Disposable

      that removes the abort listener.

      + +
      +

      Since

      v20.5.0

      +
      @@ -654,7 +699,7 @@ event target. This is useful for debugging and diagnostic purposes.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:296
    • @@ -680,7 +725,7 @@ the max set, the EventTarget will print a warning.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:325
    • @@ -711,7 +756,7 @@ the max set, the EventTarget will print a warning.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:268
    • @@ -746,7 +791,7 @@ composed of the emitted event arguments.

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:250
    • @@ -784,7 +829,7 @@ special handling:

      +
    • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:189
  • @@ -799,7 +844,7 @@ special handling:

    Returns Promise<any[]>

  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:190
    • @@ -824,7 +869,7 @@ special handling:

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/events.d.ts:340