[Twisted-Python] serializing inline callbacks

Dustin J. Mitchell dustin at v.igoro.us
Tue Feb 18 09:45:42 MST 2014


That handles the Deferred from subprocess(args), but it doesn't handle
the Deferred from self.C()

On Tue, Feb 18, 2014 at 11:40 AM, Axel Rau <Axel.Rau at chaos1.de> wrote:
>
> Am 18.02.2014 um 16:34 schrieb Dustin J. Mitchell <dustin at v.igoro.us>:
>
>> True, I only mean that
>>
>>    def A(self):
>>        ...
>>        tmp = yield subprocess(args)
>>        ...
>>        self.B()
>>
>> leaves the deferred from B totally unhandled, which is nearly always a
>> bad thing.
> Is this true, if I have a yield in B like in my case:
> —-
> @inlineCallbacks
>    def B(self):
>        ...
>        tmp = yield subprocess(args)
>        ...
>        self.C()
> —-
> ? I thought the yield is handling the deferred.
>
> Axel
> ---
> PGP-Key:29E99DD6  ☀ +49 151 2300 9283  ☀ computing @ chaos claudius
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list