Skip to content

Invalid assumption about the availability of select module leads to high CPU usage on Windows #25

Description

@rtibbles

The code here

If the 'select' module is present (POSIX systems), then select.select()
assumes that the select module is only available on POSIX systems. This doesn't seem to have been the case since at least Python 2.7, from what I can discern from the Python documentation.

As on Windows systems select.select only works on sockets, and specifically entities that have originated from WinSock, it seems like the call just gets skipped right over and causes the loop to run very rapidly.

https://docs.python.org/3/library/select.html#select.select

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions