Issue #19299: fix refleak test failures in test_asyncio

This commit is contained in:
Antoine Pitrou 2013-10-20 00:54:10 +02:00
parent 34d33a595b
commit 4ca7355901
3 changed files with 10 additions and 0 deletions

View file

@ -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