<div dir="ltr">Thanks Glyph.<div>I actually am not able to reduce the behavior to a simpler runnable example yet, and that's why I tried running my theory first through this list.</div><div>I did try a simple example just instantiating some Deferreds, firing them and gathering their results into a DeferredList (no reactor involved) and what you're saying holds true. So I'm working on getting a simpler version of my code that exposes the behavior I'm seeing and will post it once I have it.</div>

</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>Jorge<br></div></div></div>
<br><br><div class="gmail_quote">On Mon, Jul 29, 2013 at 4:04 PM, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div class="im"><br><div><div>On Jul 29, 2013, at 1:29 PM, Jorge Gonzalez <<a href="mailto:gjorge@google.com" target="_blank">gjorge@google.com</a>> wrote:</div><br><blockquote type="cite">

<div style="font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-family:arial,sans-serif;font-size:14px">

Wouldn't it be possible that <span style="font-family:'courier new',monospace">defer.gatherResults</span> inserts its callback into <span style="font-family:'courier new',monospace">d</span> before say <span style="font-family:'courier new',monospace">slowFuncReturningDeferred_B</span> 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 <span style="font-family:'courier new',monospace">slowFuncReturningDeferred_B</span> never make it to the results gathered by <span style="font-family:'courier new',monospace">defer.gatherResults</span>?</div>

</blockquote></div><br></div><div>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.</div>

<div><br></div><div>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.</div>

<span class="HOEnZb"><font color="#888888"><div><br></div><div>-glyph</div><div><br></div><div><br></div></font></span></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br></div>