chiark / gitweb /
Wait 100ms before checking if the thread is still alive
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Sat, 27 Dec 2014 22:05:29 +0000 (17:05 -0500)
committerSteven Abadie <steven@alephobjects.com>
Tue, 30 Dec 2014 22:34:11 +0000 (15:34 -0700)
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

index cf6a0aec0079f8120f7c63ca650f46994dab46e0..efff5e0d04bbd461d512a6e21020de16b391d62d 100644 (file)
@@ -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: