def notify_cancel_all_in_progress(self): for transfer_state in self._transfer_states.values(): if not transfer_state.done: transfer_state.exception = CancelledError()
def notify_cancelled(self, reason, run_done_callbacks): ''' notify cancel with reason and a whether to run done callbacks ''' self.notify_exception(CancelledError(reason), run_done_callbacks)
def cancel(self): self._monitor.notify_exception(self._meta.transfer_id, CancelledError())