void UppCadDocument::commandLoop(void) { // loop not ended INTERLOCKED_(mutex) { loopEnded = false; } while(!Thread::IsShutdownThreads()) { String currentCommand; { Mutex::Lock __(commandLineMutex) currentCommand = commandLine; } if(currentCommand.HasCommand()) { String cmd = currentCommand.GetCommand(); if(cmd != "<ESC>" && cmd != "") SendCommand(cmd); } Sleep(100); } // loop ended INTERLOCKED_(mutex) { loopEnded = true; } }
Report message to a moderator