]> git.ipfire.org Git - thirdparty/tornado.git/commit
ioloop,asyncio: Be more careful to restore old asyncio loop 2248/head
authorBen Darnell <ben@bendarnell.com>
Sat, 13 Jan 2018 22:31:32 +0000 (17:31 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 13 Jan 2018 23:58:45 +0000 (18:58 -0500)
commite964f989399b6a961b3e97e723f03fbe5fc620bc
treec497c0c711a49f0fbadaaeba56e99a7d37014470
parent2d7fb199ca91d0e6fb521f347fa1807efe7e121e
ioloop,asyncio: Be more careful to restore old asyncio loop

Any asyncio event loop that was created but neither closed nor set as
current for some thread will log a warning at the end of the test (in
a way that doesn't cause the test to fail). Fix a bug in
make_current() (in which multiple calls would clobber
self.old_asyncio) and use it more consistently when "current" status
changes.
tornado/ioloop.py
tornado/platform/asyncio.py