summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-eventloop.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-06-03 21:31:04 (GMT)
committerGitHub <noreply@github.com>2019-06-03 21:31:04 (GMT)
commit0f0a30f4da4b529e0f7df857b9f575b231b32758 (patch)
treec76047e9485f288977fb55e076b0f26eb3455ebd /Doc/library/asyncio-eventloop.rst
parent78c7d527799dacca91b9ed67057cb996efe526b0 (diff)
downloadcpython-0f0a30f4da4b529e0f7df857b9f575b231b32758.zip
cpython-0f0a30f4da4b529e0f7df857b9f575b231b32758.tar.gz
cpython-0f0a30f4da4b529e0f7df857b9f575b231b32758.tar.bz2
bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)
Add BaseEventLoop.wait_executor_on_close attribute: true by default. loop.close() now waits for the default executor to finish by default. Set loop.wait_executor_on_close attribute to False to not wait for the executor.
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-rw-r--r--Doc/library/asyncio-eventloop.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 8673f84..f75ca9a 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -140,12 +140,18 @@ Running and stopping the loop
The loop must not be running when this function is called.
Any pending callbacks will be discarded.
- This method clears all queues and shuts down the executor, but does
- not wait for the executor to finish.
+ This method clears all queues and shuts down the default executor. By
+ default, it waits for the default executor to finish. Set
+ *loop.wait_executor_on_close* to ``False`` to not wait for the executor.
This method is idempotent and irreversible. No other methods
should be called after the event loop is closed.
+ .. versionchanged:: 3.8
+ The method now waits for the default executor to finish by default.
+ Added *loop.wait_executor_on_close* attribute.
+
+
.. coroutinemethod:: loop.shutdown_asyncgens()
Schedule all currently open :term:`asynchronous generator` objects to