This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients christian.heimes, felipecruz, giampaolo.rodola, gvanrossum, meador.inge, neologix, pitrou, rosslagerwall
Date 2013-01-07.02:59:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Maybe I should explain the need for SELECT_CONNECT more.  This is necessary so that on Windows the PollSelector can use WSAPoll().  The reason is that for async connect() calls, WSAPoll() doesn't return the FD as writable, just as having an exception.  I didn't write the code (Richard Oudkerk did), and I've never run it (no access to Windows), but the workaround for the problem with WSAPoll() is apparently quite complex:

The long and short of it is that portable code must use add_connector() and remove_connector() instead of add_writer() and remove_writer() for async connect() calls.  So these need to be mapped to something different in the selector world.  The right thing would seem to add a separate flag, SELECT_CONNECT, with a value distinct from SELECT_IN and SELECT_OUT.  But I didn't write the code for that -- I made a hackish change so that the selector code exports SELECT_CONNECT as an alias for SELECT_OUT.  I did write code for add_connector() and remove_connector() but these may have to be modified slightly again later once the selector code has SELECT_OUT != SELECT_CONNECT.

Please do try to understand this -- it would not be possible to support WSAPoll() at all without distinguishing between write and connect readyness.

Feel free to ping Richard Oudkerk (shibturn at for more information.

I don't *think* the problems are in my code, since both tests pass when the SelectSelector is used.

I can currently only test on OSX 10.7 (Mountain Lion); hopefully I have more platforms after tomorrow (my first day at the new job).
Date User Action Args
2013-01-07 02:59:13gvanrossumsetrecipients: + gvanrossum, pitrou, giampaolo.rodola, christian.heimes, meador.inge, neologix, rosslagerwall, felipecruz
2013-01-07 02:59:13gvanrossumsetmessageid: <>
2013-01-07 02:59:13gvanrossumlinkissue16853 messages
2013-01-07 02:59:12gvanrossumcreate