Skip to content

Bad while loop pegging CPU on Windows #42

Description

@cdgriffith

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 a time.sleep(0.001) (or similar) is necessary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions