original_docstring: Disconnect from the server and terminate the handler event loop
docstring: Disconnect from the server and terminate the handler event loop
docstring_tokens: Disconnect from the server and terminate the handler event loop
code: def stop(self, join=True, timeout=None):
          """Disconnect from the server and terminate the handler event loop"""
          self.__terminate.set()
          if join:
              self.__thread.join(timeout=timeout)
              if self.__thread.is_alive():
                  raise RuntimeError("Failed to join thread within timeout")
code_tokens: def stop ( self , join = True , timeout = None ) : self . __terminate . set ( ) if join : self . __thread . join ( timeout = timeout ) if self . __thread . is_alive ( ) : raise RuntimeError ( "Failed to join thread within timeout" )
short_docstring: Disconnect from the server and terminate the handler event loop
short_docstring_tokens: Disconnect from the server and terminate the handler event loop
comment: """Disconnect from the server and terminate the handler event loop"""