code: def add_done_callback(self, callable_,
                            inCallbackType=CallbackType.standard,
                            inCallbackGroup=None):
          
          self.callback.append(callbackEntry(callable_,
                                             inCallbackType,
                                             inCallbackGroup))
  
          # If already completed or cancelled, execute it immediately
          if self._ended():
              self.callback[-1].func(self)
docs: Attach a callable to the future that will be called when the future
          is cancelled or finishes running. Callable will be called with the
          future as its only argument.
  
          Added callables are called in the order that they were added and are
          always called in a thread belonging to the process that added them. If
          the callable raises an Exception then it will be logged and ignored. If
          the callable raises another BaseException then behavior is not defined.
  
          If the future has already completed or been cancelled then callable will
          be called immediately.