Is there any way to do something like "yield sleep(10)" inside an
@inlineCallbacks method?
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
On 7 Oct 2009, at 20:30, Paul Thomas wrote:
> Is there any way to do something like "yield sleep(10)" inside an
> @inlineCallbacks method?
I realise I can do this:
def sleep(seconds):
d = defer.Deferred()
reactor.callLater(seconds, d.callback, seconds)
return d
but I wondered
reactor.callLater() is the best way to delay a certain function call.
sleep() will block the entire program from running, which you probably don't
want to do.
On Wed, Oct 7, 2009 at 3:35 PM, Paul Thomas
wrote:
>
> On 7 Oct 2009, at 20:30, Paul Thomas wrote:
>
> > Is there any way to do something
I was indeed being tricked. I actually tested soap with a real client, but
with xmlrpc i was using the browser. I was expecting to see the same error
message, and instead got a new one that was presented by the modifications
I pulled out of the trunk to support the issue in #4014. I was expect
On Oct 7, 2009, at 3:46 PM, Matt Perry wrote:
> On 7 Oct 2009, at 20:30, Paul Thomas wrote:
>> Is there any way to do something like "yield sleep(10)" inside an
>> @inlineCallbacks method?
>>
>> I realise I can do this:
>>
>> def sleep(seconds):
>> d = defer.Deferred()
>> reactor.callLater
On 10:04 pm, p...@bubblehouse.org wrote:
>On Oct 7, 2009, at 3:46 PM, Matt Perry wrote:
>>On 7 Oct 2009, at 20:30, Paul Thomas wrote:
>
>>>Is there any way to do something like "yield sleep(10)" inside an
>>>@inlineCallbacks method?
>>>
>>>I realise I can do this:
>>>
>>>def sleep(seconds):
>>>
On Wed, Oct 7, 2009 at 5:29 PM, wrote:
> Recent versions of Twisted include twisted.internet.defer.deferLater, a
> function rather similar to the sleep function defined above.
>
> Jean-Paul
>
>
Do you mean twisted.internet.task.deferLater?
Or am I missing something?
Kevin Horn
__
On 7 Oct, 10:40 pm, kevin.h...@gmail.com wrote:
>On Wed, Oct 7, 2009 at 5:29 PM, wrote:
>>Recent versions of Twisted include twisted.internet.defer.deferLater,
>>a
>>function rather similar to the sleep function defined above.
>>
>>Jean-Paul
>Do you mean twisted.internet.task.deferLater?
>Or am I
On Wed, Oct 7, 2009 at 6:04 PM, Phil Christensen wrote:
>
> Paul's example will work just fine. Also, AFAIK there's no existing
> twisted function to do replicate an asynchronous sleep() in this way.
>
> -phil
>
What about Deferred.setTimeout?
http://twistedmatrix.com/documents/current/api/twiste
On Wed, Oct 7, 2009 at 11:08 PM, Mikhail Terekhov wrote:
>
> What about Deferred.setTimeout?
> http://twistedmatrix.com/documents/current/api/twisted.internet.defer.Deferred.html#setTimeout
> IMHO it solves similar problem.
>
Deferred.setTimeout does something else. More importantly, it is
depr
Mikhail Terekhov wrote:
>On Wed, Oct 7, 2009 at 6:04 PM, Phil Christensen <[1]p...@bubblehouse.org>
>wrote:
>
> Paul's example will work just fine. Also, AFAIK there's no existing
> twisted function to do replicate an asynchronous sleep() in this way.
>
> -phil
>
>What
On Mon, Oct 5, 2009 at 8:21 PM, Drew Smathers wrote:
>
>
> On Mon, Oct 5, 2009 at 9:14 AM, wrote:
>>
>> I looked at PB for an architecture with one client distributing some
>> processing to several servers. Now I came across JMS and I have seen that
>> using ActiveMQ with the Stomp protocol there
12 matches
Mail list logo