Skip to content

Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)" #13802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,12 @@ 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 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 clears all queues and shuts down the executor, but does
not wait for the executor to finish.

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
Expand Down
4 changes: 1 addition & 3 deletions Lib/asyncio/base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,6 @@ async def wait_closed(self):
class BaseEventLoop(events.AbstractEventLoop):

def __init__(self):
# If true, close() waits for the default executor to finish
self.wait_executor_on_close = True
self._timer_cancelled_count = 0
self._closed = False
self._stopping = False
Expand Down Expand Up @@ -637,7 +635,7 @@ def close(self):
executor = self._default_executor
if executor is not None:
self._default_executor = None
executor.shutdown(wait=self.wait_executor_on_close)
executor.shutdown(wait=False)

def is_closed(self):
"""Returns True if the event loop was closed."""
Expand Down

This file was deleted.