code: def stop(self, timeout=1.0):
          
          stopped = self._server.stop(timeout)
          if self._handler_thread:
              self._handler_thread.stop(timeout)
  
          return stopped
docs: Stop a running server (from another thread).
  
          Parameters
          ----------
          timeout : float, optional
              Seconds to wait for server to have *started*.
  
          Returns
          -------
          stopped : thread-safe Future
              Resolves when the server is stopped