mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Issue #28500: Fix asyncio to handle async gens GC from another thread.
This commit is contained in:
parent
68adfa3b3e
commit
ed0540698e
2 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -38,6 +38,8 @@ Library
|
|||
|
||||
- Issue #28492: Fix how StopIteration exception is raised in _asyncio.Future.
|
||||
|
||||
- Issue #28500: Fix asyncio to handle async gens GC from another thread.
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue