]> git.ipfire.org Git - thirdparty/tornado.git/commit
Issue #2229: allow GCing of suspended coroutines
authorAntoine Pitrou <antoine@python.org>
Fri, 29 Dec 2017 17:13:12 +0000 (18:13 +0100)
committerBen Darnell <ben@bendarnell.com>
Sat, 13 Jan 2018 19:13:58 +0000 (14:13 -0500)
commit8c513117fcae553aa938427159de029da4f56edf
treed3a625f5af8d1024fb1547d4f3c73fabc9464768
parent1294b0765ff3041342d45bc5a6539a5c8aa2370f
Issue #2229: allow GCing of suspended coroutines

A suspended coroutine should be GCed if the underlying loop is closed
and no other outside reference exists to it.  However, a suspended coroutine
with a refcycle would be kept alive by the _futures_to_runners mapping.
Instead use a private attribute on the future.
tornado/gen.py
tornado/test/concurrent_test.py
tornado/test/gen_test.py