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 sbt
Recipients brian.curtin, jnoller, pitrou, python-dev, sbt, tim.golden
Date 2012-01-27.13:58:49
SpamBayes Score 7.52417e-07
Marked as misclassified No
Message-id <>
Quite honestly I don't like the way that polling a pipe reads a partial message from the pipe.  If at all possible, polling should not modify the pipe.

I think the cleanest thing would be to switch to byte oriented pipes on Windows and create PipeIO which subclasses RawIOBase.  (Since socket handles are really just overlapped file handles, PipeIO works for them too as long as closesocket() is used instead of CloseHandle().)  On Unix FileIO would be used instead.  Then Connection can just be a thin wrapper around a file object.

Polling on Windows can then be done by creating a wrapper for an overlapped object which represents a zero length read, and can be used with WaitForMultipleObjects().  This lets us implement a select-like wait() function in Python which works with both sockets and Connection objects.

Attached is an extension implementing PipeIO (and the overlapped wrapper), a Python module implementing Connection and wait(), and a test.
Date User Action Args
2012-01-27 13:58:51sbtsetrecipients: + sbt, pitrou, tim.golden, jnoller, brian.curtin, python-dev
2012-01-27 13:58:50sbtsetmessageid: <>
2012-01-27 13:58:50sbtlinkissue12328 messages
2012-01-27 13:58:49sbtcreate