<div>There seems to be a false assumption here: select does not &quot;poll the sockets&quot; (or anything else) and it is not inefficient. In fact, it blocks until one of  the events in question takes place, then reawakens a single process (e.g. main tasklet). This is as efficient as you can get, and &quot;native facilities&quot; are almost certainly just doing the same thing in a hidden place.</div>

<div> </div>
<div>Larry Dickson<br>Cutting Edge Networked Storage<br> </div>
<div><span class="gmail_quote">On 7/9/09, <b class="gmail_sendername">Kristján Valur Jónsson</b> &lt;<a href="mailto:kristjan@ccpgames.com">kristjan@ccpgames.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">StacklessIO is written in C++.  It uses native facilities to notify an internal event queue when an IO request has completed, instead of requiring the &quot;main tasklet&quot; to regularly poll the sockets using select() which is inefficient.  This aims to minimize latency and reduce overhead.  It can also use the async. notification facility of the python C api to wake up sleeping tasklets without requiring the main tasklet to poll the event queue.<br>
It is also more &#39;complete&#39; in its emulation of the native socket module, I think.<br>But performance tests by Richard on his module have still shown it to be very capable, and to scale better than threaded solutions like your irc server, so it may well be quite adequate for the task.<br>
<br>K<br><br>&gt; -----Original Message-----<br>&gt; From: Henning Diedrich [mailto:<a href="mailto:hd@authentic-internet.de">hd@authentic-internet.de</a>]<br>&gt; Sent: 9. júlí 2009 14:02<br>&gt; To: Kristján Valur Jónsson; <a href="mailto:stackless@stackless.com">stackless@stackless.com</a><br>
&gt; Subject: Re: [Stackless] irc threads<br>&gt;<br>&gt;<br>&gt;<br>&gt; Kristján Valur Jónsson wrote:<br>&gt; &gt; Yes, stacklessIO is designed to do that for you, to provide a<br>&gt; transparently tasklet-blocking replacement module for socket and<br>
&gt; others.<br>&gt; &gt; However, I hven&#39;t still managed to release it (although I do intend<br>&gt; to as soon as I can) and it is at them moment Windows only, and likely<br>&gt; to remain so for a bit.<br>&gt; &gt;<br>
&gt; &gt; Meanwhile, there is Richard Tew&#39;s async socket implementation.<br>&gt; &gt;<br>&gt; &gt; K<br>&gt; &gt;<br>&gt;<br>&gt; Thanks for the clarification. What is the difference between<br>&gt; stacklessIO<br>&gt; and Richard&#39;s implementation? This question is probably naive but maybe<br>
&gt; some pointers are possible?<br>&gt;<br>&gt; Thanks,<br>&gt; Henning<br><br><br>_______________________________________________<br>Stackless mailing list<br><a href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br>
<a href="http://www.stackless.com/mailman/listinfo/stackless">http://www.stackless.com/mailman/listinfo/stackless</a><br></blockquote></div><br>