code: def close(self):
          
          if not self.is_running:
              return
  
          self._state = CLOSED
  
          self.logger.debug('killing %d worker(s)', len(self._killables))
          self._killables.kill(block=False)
  
          self.logger.debug('closing %d connection(s)', len(self._connections))
          for conn in self._connections:
              conn.close_stream()
  
          self.on_close.send(self)
docs: Immediately close all connections and stop workers.