-
Notifications
You must be signed in to change notification settings - Fork 47
Bad while loop pegging CPU on Windows #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have a project using I tried both of these ideas, and simply joining the thread (not using I don't know enough about |
the new v4 under development in #79 should fix this problem, as it relyes on For people needing it the option to run non-blocking is still there, but than the programmer would be responsible for implementing a |
this should be fixed in |
https://github.com/magmax/python-readchar/blob/master/readchar/readchar.py#L71
Nothing slowing this while loop is causing a CPU core to be pegged on Windows. Either removing
if msvcrt.kbhit()
or adding atime.sleep(0.001)
(or similar) is necessary.The text was updated successfully, but these errors were encountered: