Function onCancel

  • Takes a callback to execute on cancellation. If the cancellation had already happened, callback will also be asynchronously executed. Returns a cleanup function to stop waiting on cancellation.

    Parameters

    Returns Callable