def OnRun(self):
        """ just loop and write responses """
            
        pydevd_tracing.SetTrace(None) # no debugging on this thread
        try:
            while not self.killReceived:
                try:
                    cmd = self.cmdQueue.get(1)
                except:
                    #PydevdLog(0, '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
                out = cmd.getOutgoing()
                if DEBUG_TRACE_LEVEL >= 1:
                    out_message = 'sending cmd: '
                    out_message += ID_TO_MEANING.get(out[:3], 'UNKNOWN')
                    out_message += ' '
                    out_message += out
                    try:
                        sys.stderr.write('%s\n' % (out_message,))
                    except:
                        pass
                
                if IS_PY3K:
                    out = bytearray(out, 'utf-8')
                self.sock.send(out) #TODoo: this does not guarantee that all message are sent (and jython does not have a send all)
                if time is None:
                    break #interpreter shutdown
                time.sleep(self.timeout)                
        except Exception:
            GlobalDebuggerHolder.globalDbg.FinishDebuggingSession()
            if DEBUG_TRACE_LEVEL >= 0:
                traceback.print_exc()
    
    


#--------------------------------------------------- CREATING THE SOCKET THREADS
    
#=======================================================================================================================
# StartServer
#=======================================================================================================================
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/common/diagnostic/pydevDebug/pydevd_comm.py/WriterThread.OnRun/original