[Twisted-Python] inlineCallbacks cascading cancelling and more

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Aug 23 08:23:12 MDT 2010


On 10:22 am, smagafurov at naumen.ru wrote:
>Thanks to all!
>Especially to Yaroslav Fedevych who explain me my misstake in my native 
>language :)
>I was wrong with deferreds usage.
>
>Cascading cancelling of inlineCallbacks is still needed to me, but it 
>can be realized with current Deferred API.
>
>This way for example:
>
>[snip]
>
>This inlineCallbacksWithCascadeCancelling cancels immediately "child" 
>(wait result) deferred when "parent" deferred finished (canceled for 
>example) and stops generator.
>
>May be this behaviour must be default for inlineCallbacks (i.e. 
>defer.inlineCallbacks = inlineCallbacksWithCascadeCancelling)?

If you can write some unit tests for this, turn the whole thing into a 
patch (using svn diff), and attach it to ticket #4632, that'd be great.

Jean-Paul




More information about the Twisted-Python mailing list