On Jul 29, 2013, at 1:29 PM, Jorge Gonzalez <gjo...@google.com> wrote:

> Wouldn't it be possible that defer.gatherResults inserts its callback into d 
> before say slowFuncReturningDeferred_B gets to run and return its own 
> Deferred (and therefore chain it to what gatherRestults is ultimately waiting 
> for?). If so, wouldn't the results returned by slowFuncReturningDeferred_B 
> never make it to the results gathered by defer.gatherResults?

No, that's not what happens.  You call addCallback(lambda _: slowFunc...A()), 
then you call gatherResults.  That means gatherResult's callback is after 
slowFuncReturningA() in d's callback chain.

Can you attach an actual runnable code example with some behavior that you 
didn't expect, so we can actually run it and explain what's happening?  No need 
for you to spin the reactor or anything, just instantiate a Deferred and then 
fire it.

-glyph


_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to