Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-15 Thread Simone Deponti
On 07/14/2009 06:37 PM, vit...@synapticvision.com wrote: > > "cancel" callback - stop running now what you've been asked to exec. > Example: some SQL query that takes 5 min and I need to cancel it > anywhere in the middle and it, of course, it doesn't matter what the > result set. > It seems like

Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread David Bolen
vit...@synapticvision.com writes: > "cancel" callback - stop running now what you've been asked to exec. > Example: some SQL query that takes 5 min and I need to cancel it > anywhere in the middle and it, of course, it doesn't matter what the > result set. Note that the Deferred itself has no

Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread vitaly
Thank you, "cancel" callback - stop running now what you've been asked to exec. Example: some SQL query that takes 5 min and I need to cancel it anywhere in the middle and it, of course, it doesn't matter what the result set. As far as I see from base.py and client.py, some sort of timeout no

Re: [Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread Jean-Paul Calderone
On Tue, 14 Jul 2009 11:10:10 -0400, vit...@synapticvision.com wrote: >Hello, > >is there any way to cancel the Deferred callback in those examples? > >1. >d = defer.Deferred() >d.addCallback(methodA).addErrback(methodErr) >d.callback(None) > >2. >d = methodB().addErrback(methodErr) >wfd = defer.wai

[Twisted-Python] Cancel/stop Deferred() at any time

2009-07-14 Thread vitaly
Hello, is there any way to cancel the Deferred callback in those examples? 1. d = defer.Deferred() d.addCallback(methodA).addErrback(methodErr) d.callback(None) 2. d = methodB().addErrback(methodErr) wfd = defer.waitForDeferred(d) Appreciate any help. ___