parameters: (self)
return_statement: return True
docstring: 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.
docstring_summary: Cancel the future and schedule callbacks.
docstring_tokens: Cancel the future and schedule callbacks .
function: def cancel(self):
          """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.__schedule_callbacks()
          return True
function_tokens: def cancel ( self ) : self . __log_traceback = False if self . _state != _PENDING : return False self . _state = _CANCELLED self . __schedule_callbacks ( ) return True