asyncio: Sync with upstream
This commit is contained in:
parent
491a912659
commit
c5420492cf
|
@ -348,6 +348,9 @@ class BaseEventLoop(events.AbstractEventLoop):
|
||||||
self._asyncgens.discard(agen)
|
self._asyncgens.discard(agen)
|
||||||
if not self.is_closed():
|
if not self.is_closed():
|
||||||
self.create_task(agen.aclose())
|
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):
|
def _asyncgen_firstiter_hook(self, agen):
|
||||||
if self._asyncgens_shutdown_called:
|
if self._asyncgens_shutdown_called:
|
||||||
|
|
Loading…
Reference in New Issue