[Twisted-Python] kqueue reactor / ticket #1918

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Fri Nov 4 10:39:56 EDT 2011

On 02:11 pm, tobias.oberstein at tavendo.de wrote:
>>Is there even a kqueue-based Twisted reactor?
>>Yes... ish.  More detail here: 
>Hi Glyph,
>first, thanks as always!
>The pykqueue 1.3 and 2.0 referenced in that ticket seem to be no longer
>On the other hand, Python has built-in support for kqueue since Python 
>in the select module.
>I have adjusted the Twisted kqreactor to select.kqueue and made a 
>I have tested that reactor successfully with Autobahn WebSockets on 
>FreeBSD 8.2
>(running as a VirtualBox x86 VM). When I'm home later, I can check out 
>Doing the Autobahn tests helped me finding the only non-canonical 
>change required
>Is there any regression/test/stresstest I could run to verify the stuff 
>actually works?

You can run the Twisted test suite:

    trial --reactor kqueue twisted

(assuming you've hooked up the name "kqueue" to your new version of the 
kqueue reactor).

This is what needs to work in order for the new reactor to be added to 
Twisted itself (ie, for us to resolve #1918).

>The Autobahn WS tests do quite some stuff, but they do not test 
>concurrency and
>high connections numbers ..
>Twisted-Python mailing list
>Twisted-Python at twistedmatrix.com

More information about the Twisted-Python mailing list