(self, msg=None)
return True
Cancel the future and schedule callbacks.

        If the future is already done or cancelled, return False.  Otherwise,
        change the future's state to cancelled, schedule the callbacks and
        return True.
Cancel the future and schedule callbacks.
Cancel the future and schedule callbacks .
def cancel(self, msg=None):
        """Cancel the future and schedule callbacks.

        If the future is already done or cancelled, return False.  Otherwise,
        change the future's state to cancelled, schedule the callbacks and
        return True.
        """
        self.__log_traceback = False
        if self._state != _PENDING:
            return False
        self._state = _CANCELLED
        self._cancel_message = msg
        self.__schedule_callbacks()
        return True
def cancel ( self , msg = None ) : self . __log_traceback = False if self . _state != _PENDING : return False self . _state = _CANCELLED self . _cancel_message = msg self . __schedule_callbacks ( ) return True