codemelted.js Module
    Preparing search index...

    Class CFuture<T>

    The resulting object from the async_task function call with a promise of the future CResult.

    The data associated with the CResult.value function call.

    Type Parameters

    Index
    • Result for the async_task function call. Must call execute() to kick-off the future task.

      Type Parameters

      Parameters

      • params: { data: T; delay?: number; task: CTaskCB<T> }

        The named parameters.

        • data: T

          The optional data to pass to the task.

        • Optionaldelay?: number

          The delay to schedule the task in the future. Defaults to 0 if not specified.

        • task: CTaskCB<T>

          The task to run.

      Returns CFuture<T>

    • Will cancel a currently running task. If no task is running then this action is a no-op.

      Returns void

    • Allows for re-execution of the CFuture wrapped task.

      Parameters

      • Optionaldata: any

        The optional data to pass if necessary when re-executing the task.

      Returns void

    • Determines if the task has completed or not.

      Returns boolean

      true if completed, false otherwise.