'Stop the server.
This method causes the serve() method to return.  stop() may be invoked
from within your handler, or from another thread.
After stop() is called, serve() will return but the server will still
be listening on the socket.  serve() may then be called again to resume
processing requests.  Alternatively, close() may be called after
serve() returns to close the server socket and shutdown all worker
threads.'

def stop(self):

    self._stop = True
    self.wake_up()
