Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7f9a2ae7
Commit
7f9a2ae7
authored
Jun 04, 2019
by
Łukasz Langa
Committed by
GitHub
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)" (#13802)
This reverts commit
0f0a30f4
.
parent
8f4bbb5d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
15 deletions
+3
-15
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+2
-8
Lib/asyncio/base_events.py
Lib/asyncio/base_events.py
+1
-3
Misc/NEWS.d/next/Library/2019-06-03-22-54-15.bpo-34037.fKNAbH.rst
...S.d/next/Library/2019-06-03-22-54-15.bpo-34037.fKNAbH.rst
+0
-4
No files found.
Doc/library/asyncio-eventloop.rst
View file @
7f9a2ae7
...
...
@@ -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
...
...
Lib/asyncio/base_events.py
View file @
7f9a2ae7
...
...
@@ -380,8 +380,6 @@ class Server(events.AbstractServer):
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
...
...
@@ -637,7 +635,7 @@ class BaseEventLoop(events.AbstractEventLoop):
executor
=
self
.
_default_executor
if
executor
is
not
None
:
self
.
_default_executor
=
None
executor
.
shutdown
(
wait
=
self
.
wait_executor_on_clo
se
)
executor
.
shutdown
(
wait
=
Fal
se
)
def
is_closed
(
self
):
"""Returns True if the event loop was closed."""
...
...
Misc/NEWS.d/next/Library/2019-06-03-22-54-15.bpo-34037.fKNAbH.rst
deleted
100644 → 0
View file @
8f4bbb5d
:mod:`asyncio`: ``loop.close()`` now waits for the default executor to
finish by default. Set ``loop.wait_executor_on_close`` attribute to
``False`` to opt-in for Python 3.7 behavior (not wait for the executor to
finish).
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment