]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Dereference the current YieldPoint as soon as it resolves.
authorBen Darnell <ben@bendarnell.com>
Fri, 17 May 2013 04:07:25 +0000 (00:07 -0400)
committerBen Darnell <ben@bendarnell.com>
Fri, 17 May 2013 04:07:25 +0000 (00:07 -0400)
These references could otherwise keep a chain of old references alive
(test code: https://groups.google.com/group/python-tornado/browse_thread/thread/37d3928817e4924d)

tornado/gen.py

index 885b604d33102d32bd409192b23daa5b1250ce8d..c2b8958751d7a5b84ce5406c6b5dffcf283f8db6 100644 (file)
@@ -498,6 +498,7 @@ class Runner(object):
                         if not self.yield_point.is_ready():
                             return
                         next = self.yield_point.get_result()
+                        self.yield_point = None
                     except Exception:
                         self.exc_info = sys.exc_info()
                 try: