summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-10-21 21:14:17 (GMT)
committerYury Selivanov <yury@magic.io>2016-10-21 21:14:17 (GMT)
commitf5cd8a29f39662ef0756027f73556639c54fceb2 (patch)
treef64fe3b22494918ab15eecb8cbcb78c50b9867bb /Lib/asyncio
parent1f489a3a332a26a718907558f1d7504db72da09c (diff)
parented0540698ef2ea66dfd662ac6e98a15e8eabf365 (diff)
downloadcpython-f5cd8a29f39662ef0756027f73556639c54fceb2.zip
cpython-f5cd8a29f39662ef0756027f73556639c54fceb2.tar.gz
cpython-f5cd8a29f39662ef0756027f73556639c54fceb2.tar.bz2
Merge 3.6 (issue #28500)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/base_events.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 5b5fcde..e59b2b7 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -351,6 +351,9 @@ class BaseEventLoop(events.AbstractEventLoop):
self._asyncgens.discard(agen)
if not self.is_closed():
self.create_task(agen.aclose())
+ # Wake up the loop if the finalizer was called from
+ # a different thread.
+ self._write_to_self()
def _asyncgen_firstiter_hook(self, agen):
if self._asyncgens_shutdown_called: