Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Pool

Hierarchy

  • Pool

Index

Constructors

constructor

  • new Pool(poolKey: string): Pool
  • Create pool to manage manually

    Parameters

    • poolKey: string

      Unique pool key

    Returns Pool

Properties

Private poolKey

poolKey: string

Private promiseList

promiseList: Promise<any>[] = []

Private subscribeList

subscribeList: PoolSubscribeCallback[] = []

Private taskCount

taskCount: number = 0

Accessors

key

  • get key(): string

Methods

append

  • append<T>(promise: Promise<T>): void
  • Adds the promise current pool and notifies listeners

    Type parameters

    • T

    Parameters

    • promise: Promise<T>

    Returns void

Private notifyStatus

  • notifyStatus(): void

Private promiseFinisher

  • promiseFinisher(promise: Promise<any>): () => void
  • Parameters

    • promise: Promise<any>

    Returns () => void

      • (): void
      • Returns void

subscribe

  • Subscribes to the current pool

    Parameters

    Returns () => void

    Returns unsubscribe method

      • (): void
      • Returns void

Generated using TypeDoc