Execute the future in a new thread or in the current thread as specified
    by the *as_thread* parameter.

    :param as_thread: Execute the future in a new, separate thread. If this
      is set to :const:`False`, the future will be executed in the calling
      thread.

def start(self, as_thread=True):
    """
    Execute the future in a new thread or in the current thread as specified
    by the *as_thread* parameter.

    :param as_thread: Execute the future in a new, separate thread. If this
      is set to :const:`False`, the future will be executed in the calling
      thread.
    """

    with self._lock:
      if as_thread:
        self.enqueue()  # Validate future state
      if self._cancelled:
        return

      self._running = True
      if as_thread:
        self._thread = threading.Thread(target=self._run)
        self._thread.start()
        return self

    self._run()