code: def set_result(self, result):
          
          with self.__condition:
              self.__result = result
              self.__state = FINISHED
              self.__condition.notify_all()
          self._invoke_callbacks()
docs: Sets the return value of work associated with the future.
          Only called internally.