[Twisted-Python] sleeping in inlineCallbacks
glyph at twistedmatrix.com
Thu Oct 29 04:06:11 EDT 2009
In general, please reply on this list inline, with quoting and
trimming, like so:
This might seem like a minor thing, but it really helps those of us
who have to follow long discussions and many mailing lists.
Now, on to the main point of your message:
On Oct 28, 2009, at 5:48 PM, Brian Granger wrote:
> I have been using Twisted for years but only recently began to use
> inlineCallbacks (couldn'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.
Which asynch sleep function?
I hope you're not talking about this stuff, quoted in your message:
> On Wed, Oct 7, 2009 at 8:28 PM, Andrew Bennetts
> <andrew at bemusement.org> wrote:
> > What about Deferred.setTimeout?
Please note spiv's reply:
> Deferred.setTimeout is a poor API and is deprecated (despite what the
> automatically generated API docs think).
and his recommendation:
> So please, don't use setTimeout, and definitely do not recommend it
> to others!
I hope that, instead, you're talking about the deferLater function
that was introduced in Twisted 8.0?
This will act like an async 'sleep' if its result is yielded from an
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python