diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-03 15:35:23 -0700 |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-03 15:35:23 -0700 |
commit | bd2f8fd9473e381e9d800cdd4a81a4c3c4b53c70 (patch) | |
tree | cae00492d600b97b4f8502f25562a78836982c51 /Lib/asyncio/base_events.py | |
parent | 0e836046d564743e4409fb48f0054a5f73be8c84 (diff) | |
download | cpython-bd2f8fd9473e381e9d800cdd4a81a4c3c4b53c70.tar.gz |
asyncio: Sync with upstream
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r-- | Lib/asyncio/base_events.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index ddf041d4d0..5597bcb7cd 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -348,6 +348,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: |