[Tutor] Infinite Loops (and threads)

Jonathan McManus jonathan at acss.net.au
Sun Dec 24 11:27:59 CET 2006

Hi all,

Just a quick question, really. Is there any good way to have an infinite
loop in a program, without said infinite loop eating up the CPU? I've
tried the trick of adding a pause (time.sleep(0.01)) somewhere in the
loop, and this appears to have worked on a basic infinite loop, but this
doesn't appear to work for two separate infinite loops (in threads).

Thanks in advance.

Jonathan McManus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/tutor/attachments/20061224/6b1457e4/attachment.pgp 

More information about the Tutor mailing list