def terminate ( self ) : # Tear down the Pailgun TCPServer. if self . pailgun : self . pailgun . server_close ( ) super ( PailgunService , self ) . terminate ( )
python how to terminate a thrad
Override of PantsService . terminate () that cleans up when the Pailgun server is terminated .
def terminate(self):
    """Override of PantsService.terminate() that cleans up when the Pailgun server is terminated."""
    # Tear down the Pailgun TCPServer.
    if self.pailgun:
      self.pailgun.server_close()

    super(PailgunService, self).terminate()