code: def _on_run(self):
          ''' just loop and write responses '''
  
          try:
              while True:
                  try:
                      try:
                          cmd = self.cmdQueue.get(1, 0.1)
                      except _queue.Empty:
                          if self.killReceived:
                              try:
                                  self.sock.shutdown(SHUT_WR)
                                  self.sock.close()
                              except:
                                  pass
  
                              return  # break if queue is empty and killReceived
                          else:
                              continue
                  except:
                      # pydev_log.info('Finishing debug communication...(1)')
                      # when liberating the thread here, we could have errors because we were shutting down
                      # but the thread was still not liberated
                      return
                  cmd.send(self.sock)
  
                  if cmd.id == CMD_EXIT:
                      break
                  if time is None:
                      break  # interpreter shutdown
                  time.sleep(self.timeout)
          except Exception:
              GlobalDebuggerHolder.global_dbg.finish_debugging_session()
              if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 0:
                  pydev_log_exception(f _on_run(self):
          ''' just loop and write responses '''
  
          try:
              while True:
                  try:
                      try:
                          cmd = self.cmdQueue.get(1, 0.1)
                      except _queue.Empty:
                          if self.killReceived:
                              try:
                                  self.sock.shutdown(SHUT_WR)
                                  self.sock.close()
                              except:
                                  pass
  
                              return  # break if queue is empty and killReceived
                          else:
                              continue
                  except:
                      # pydev_log.info('Finishing debug communication...(1)')
                      # when liberating the thread here, we could have errors because we were shutting down
                      # but the thread was still not liberated
                      return
                  cmd.send(self.sock)
  
                  if cmd.id == CMD_EXIT:
                      break
                  if time is None:
                      break  # interpreter shutdown
                  time.sleep(self.timeout)
          except Exception:
              GlobalDebuggerHolder.global_dbg.finish_debugging_session()
              if DebugInfoHolder.DEBUG_TRACE_LEVEL >= 0:
                  pydev_log_exception()
docs: just loop and write responses