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

Constructors

Methods

  • Parameters

    • promiseFactory: ITask<Promise<T>>
    • Optionaldelay: number

    Returns Promise<T>