mona-dish
    Preparing search index...

    Class CancellablePromise

    a cancellable promise a Promise with a cancel function, which can be cancellend any time this is useful for promises which use cancellable asynchronous operations note, even in a cancel state, the finally of the promise is executed, however subsequent thens are not anymore. The current then however is fished or a catch is called depending on how the outer operation reacts to a cancel order.

    Hierarchy

    • Promise
      • CancellablePromise
    Index

    Constructors

    • Parameters

      • executor: (resolve: (val?: any) => void, reject: (val?: any) => void) => void

        asynchronous callback operation which triggers the callback

      • cancellator: () => void

        cancel operation, separate from the trigger operation

      Returns CancellablePromise

    Properties

    status: PromiseStatus = PromiseStatus.PENDING

    Methods

    • Parameters

      • executorFunc: (val?: any) => any
      • Optionalcatchfunc: (val?: any) => any

      Returns CancellablePromise

    • Parameters

      • reason: any

      Returns Promise

    • Parameters

      • reason: any

      Returns Promise