Glyph,<br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;"><div><div><div>
In general, please reply on this list inline, with quoting and trimming, like so:</div><div><br></div><div>    <a href="http://en.wikipedia.org/wiki/Posting_style#Inline_replying" target="_blank">http://en.wikipedia.org/wiki/Posting_style#Inline_replying</a></div>
<div><br></div><div>This might seem like a minor thing, but it really helps those of us who have to follow long discussions and many mailing lists.</div></div></div></div></blockquote><div><br>Sorry, just being lazy... <br>
</div><div><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;"><div><div class="im"><div></div>
<blockquote type="cite">I have been using Twisted for years but only recently began to use inlineCallbacks (couldn&#39;t give up Python 2.4 support until recently).  This simple asynch. sleep function is fantastic.  Just today I used to it with inlineCallbacks to dramatically clean up some complex deferred logic.<font color="#000000"><font color="#144fae"><br>
</font></font></blockquote><div><br></div></div><div>Which asynch sleep function?</div><div><br></div></div></div></blockquote><div><br>This one posted by Paul:<br><br>def sleep(seconds):<br>
     d = defer.Deferred()<br>
     reactor.callLater(seconds, d.callback, seconds)<br>
     return d<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;"><div><div></div><div>I hope you&#39;re not talking about this stuff, quoted in your message:</div>
<br><blockquote type="cite"><div class="gmail_quote"><div class="im">On Wed, Oct 7, 2009 at 8:28 PM, Andrew Bennetts <span dir="ltr">&lt;<a href="mailto:andrew@bemusement.org" target="_blank">andrew@bemusement.org</a>&gt;</span> wrote:</div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
&gt;    What about Deferred.setTimeout?</div></blockquote></div></blockquote><div><br></div><div>Please note spiv&#39;s reply:</div><div class="im"><div><br></div><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
</div>Deferred.setTimeout is a poor API and is deprecated (despite what the<br>
automatically generated API docs think). <br></blockquote></div></blockquote></div></div></div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="word-wrap: break-word;"><div><div class="im"><div></div></div>and his recommendation:</div><div class="im"><div><br><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

So please, don&#39;t use setTimeout, and definitely do not recommend it to others!<br></blockquote></div></blockquote></div></div></div></blockquote><div><br>Definitely not - I did see this warning.<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;"><div class="im"></div><div>I hope that, instead, you&#39;re talking about the deferLater function that was introduced in Twisted 8.0?</div>
<div><br></div><div><a href="http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.task.html#deferLater" target="_blank">http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.task.html#deferLater</a></div>
<div><br></div><div>This will act like an async &#39;sleep&#39; if its result is yielded from an @inlineCallbacks function.</div><div><br></div></div></blockquote><div><br>I looked at deferLater, but am not using it right now.  The sleep function I am using is basically the same as this - in my case &quot;sleep&quot; turned out to be a little simpler because I don&#39;t have to create and pass the clock around.  But I will probably use deferLater for this same purpose in the future as well.<br>
<br>Cheers,<br><br>Brian<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;"><div></div></div><br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>