Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ThrottledDelayer<T>

A helper to delay execution of a task that is being requested often, while preventing accumulation of consecutive executions, while the task runs.

The mail man is clever and waits for a certain amount of time, before going out to deliver letters. While the mail man is going out, more letters arrive and can only be delivered once he is back. Once he is back the mail man will do one more trip to deliver the letters that have accumulated while he was out.

Type parameters

  • T

Hierarchy

  • ThrottledDelayer

Index

Constructors

constructor

  • Parameters

    • defaultDelay: number

    Returns ThrottledDelayer

Methods

cancel

  • cancel(): void
  • Returns void

dispose

  • dispose(): void
  • Returns void

isTriggered

  • isTriggered(): boolean
  • Returns boolean

trigger

  • Parameters

    Returns Promise<T>

Generated using TypeDoc