aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 5f1bff71f2d..2e007137414 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -185,6 +185,14 @@ class BaseEventLoop(events.AbstractEventLoop):
"""
self.call_soon(_raise_stop_error)
+ def close(self):
+ self._ready.clear()
+ self._scheduled.clear()
+ executor = self._default_executor
+ if executor is not None:
+ self._default_executor = None
+ executor.shutdown(wait=False)
+
def is_running(self):
"""Returns running status of event loop."""
return self._running