select.poll() and WSAPoll

Jean-Paul Calderone exarkun at divmod.com
Tue May 6 12:35:26 EDT 2008


On Tue, 6 May 2008 08:44:36 -0700 (PDT), Giles Brown <giles_brown at hotmail.com> wrote:
>On 6 May, 14:18, Jean-Paul Calderone <exar... at divmod.com> wrote:
>> On Tue, 6 May 2008 08:36:28 -0400, inhahe <inh... at gmail.com> wrote:
>> >select.poll isn't supported on Windows, because Windows doesn't have such a
>> >feature, or at least it didn't until Vista.  Vista implements the same thing
>> >but called  WSAPoll, an article is here
>> >http://blogs.msdn.com/wndp/archive/2006/10/26/WSAPoll.aspx
>> >I hope that the next edition of Python supports select.poll on Vista, or at
>> >least that someone writes a third-party module fo it. As much as I'd love to
>> >do it myself, it's probably beyond me.. i've never used poll before nor
>> >written a Python extension.  also, i don't have Vista.
>> >Thanks
>>
>> If you use Twisted, then you can use I/O Completion Ports, which are even
>> better than WSAPoll, and your code will also work with KQueue on BSD or
>> EPoll on Linux without any changes. :)
>>
>> Jean-Paul
>
>The current docs describe the I/O Completion Ports reactor as
>"extremely experimental".
>
>http://twistedmatrix.com/projects/core/documentation/howto/choosing-reactor.html#auto8
>
>Is that overly conservative or is it as bleeding edge as it sounds?
>
>(IIRC there have been caveats like this on the Windows reactors for
>a while)

With the most recent release, the IOCP reactor is in much better shape than
it ever has been before.  It's not perfect, but it fails fewer than 10 unit
tests from the Twisted suite (of almost 4300).  The goal, of course, is for
it to fail none of them. ;)  It's possible we'll get there for a release in
the not too distant future.

The current results of the test suite are available at this extremely pretty
URL:

http://buildbot.twistedmatrix.com/waterfall?builder=win32-py2.4-iocp&builder=winxp32-py2.5-iocp&builder=vista-py2.5-iocp&builder=server-2k8-x86-py2.5-iocp&branch=trunk

So I'd call it "almost working" rather than "extremely experimental" at this
point.  Thanks for bringing this up, we should probably adjust our docs. :)

Jean-Paul



More information about the Python-list mailing list