From e67704d967d3111239e14d90c5d3cc8c9fb24228 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Sat, 27 Dec 2014 17:05:29 -0500 Subject: [PATCH] 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 --- Cura/serialCommunication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.30.2