[issue29173] Python 3.6 on Windows wastes a lot of CPU cycles in a while loop

2017-01-05 Thread Eryk Sun
Changes by Eryk Sun : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list

[issue29173] Python 3.6 on Windows wastes a lot of CPU cycles in a while loop

2017-01-05 Thread Prahlad Yeri
Prahlad Yeri added the comment: Hi STINNER Victor, Thanks a lot, after adding the sleep function, it has stopped wasting the CPU cycles! A long while ago, I remember coding a similar loop in linux and not faced such issue, so I thought maybe it was a bug in 3.6. Anyway, I'm closing this.

[issue29173] Python 3.6 on Windows wastes a lot of CPU cycles in a while loop

2017-01-05 Thread STINNER Victor
STINNER Victor added the comment: The code doesn't seem like a bug in Python, but more a classic inefficient busy loop pattern. Your loop doesn't sleep and so eats all the CPU. I suggest to close the issue and ask Python questions on a place to ask questions, not on the Python *bug tracker*.

[issue29173] Python 3.6 on Windows wastes a lot of CPU cycles in a while loop

2017-01-05 Thread Prahlad Yeri
New submission from Prahlad Yeri: I'm running Python 3.6 on Windows 7. It wastes a lot of cpu cycles when inside a loop. In attached screenshot, you'll find that ~25% cpu is used by Python, while all I'm doing is running a pomodoro script that waits for a specific timeslot to complete. Here