mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #28500: Fix asyncio to handle async gens GC from another thread.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user