<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 13, 2014, at 6:22 AM, Laurens Van Houtven <_@lvh.io> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 13, 2014 at 3:19 PM,  <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com" target="_blank">exarkun@twistedmatrix.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
select() has a hard limit that is often 1024.  Make sure you're not using the select()-based reactor (which I think is probably the default on OS X).<br>
<br>
Jean-Paul<br></blockquote><div><br></div><div>What is the A-grade reactor on OS X? I thought it was cfreactor, but the docs appear to brand it as a GUI reactor (that doesn't mean it can't be better than select, of course); perhaps it's kqueuereactor but I hear kqueue is kind of gimpy on OS X compared to FreeBSD (but I have no idea what that actually entails).<br></div></div></div></div></blockquote><br></div><div>Actually, by default, cfreactor doesn't even support a GUI; you need to specifically install a different main loop (as the docs explain, "install(runner=PyObjCTools.AppHelper.runEventLoop)") in order to integrate with a GUI.  The reason the docs brand it as such is that you <i>cannot</i> have an OS X GUI cooperate with your Twisted main loop using a different reactor.</div><div><br></div><div>KQueue's gimpiness is entirely to do with deficiencies in its behavior with regard to weird file descriptor types, mostly PTYs.  (I've seen some people talking about difficulties with pipes, but I've never had an issue with them personally; I don't know what that's about.)  If all you need to do is talk to a lot of sockets, KQueue is just fine.</div><div><br></div><div>-glyph</div></body></html>