[Twisted-Python] Strange recursion error with twisted.web
Glyph
glyph at twistedmatrix.com
Tue Mar 16 20:50:30 MDT 2021
> On Mar 16, 2021, at 4:20 AM, Peter Westlake <peter.westlake at pobox.com> wrote:
>
> On Sun, 14 Mar 2021, at 02:08, Glyph wrote:
>>
>> I did indeed have a half-finished experiment to fix this. The fix is now finished and in review here: https://twistedmatrix.com/trac/ticket/10125#comment:1 <https://twistedmatrix.com/trac/ticket/10125#comment:1> .
>>
>> If you could review it thoroughly enough, I could land it.
>
> Excellent, thank you!
>
> I think I understand how it works, but one thing puzzles me: how does the queue in the jump() function ever get longer than one element? Is it because it might contain a recursive call, which is activated by the unpause()?
This was actually a really insightful review - after thinking about it for a moment, I realized that the actual trampoline was already in twisted.internet.defer._inlineCallbacks, and this function was totally useless complexity! Thank you!
-g
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20210316/997d6a7b/attachment.htm>
More information about the Twisted-Python
mailing list