asyncio: Document EventLoop.close().

This commit is contained in:
Guido van Rossum 2013-11-01 14:19:04 -07:00
parent 2b57016458
commit e3f52ef067
3 changed files with 20 additions and 0 deletions

View file

@ -186,6 +186,11 @@ class BaseEventLoop(events.AbstractEventLoop):
self.call_soon(_raise_stop_error)
def close(self):
"""Close the event loop.
This clears the queues and shuts down the executor,
but does not wait for the executor to finish.
"""
self._ready.clear()
self._scheduled.clear()
executor = self._default_executor