From: Youness Alaoui Date: Sat, 27 Dec 2014 22:05:29 +0000 (-0500) Subject: Wait 100ms before checking if the thread is still alive X-Git-Tag: 14.09-1.18~5^2~17 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b7d9420b0e2a737d85073bda16cdb7859f78c941;p=cura.git Wait 100ms before checking if the thread is still alive By waiting for 0s, it means we have an infinite loop in serialCommunication which makes it take 100% of CPU as long as it's running. Fixes issue #64 --- diff --git a/Cura/serialCommunication.py b/Cura/serialCommunication.py index cf6a0aec..efff5e0d 100644 --- a/Cura/serialCommunication.py +++ b/Cura/serialCommunication.py @@ -72,7 +72,7 @@ def startMonitor(portName, baudrate): thread = threading.Thread(target=comm.monitorStdin) thread.start() while thread.is_alive(): - time.sleep(0) + time.sleep(0.1) def main(): if len(sys.argv) != 3: