diff options
author | Yury Selivanov <yury@magic.io> | 2018-05-28 21:54:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-28 21:54:02 (GMT) |
commit | 416c1ebd9896b394790dcb4f9f035b1a44ebe9ff (patch) | |
tree | a5003eed8be41259a0e545fde1c2d22bf2ac23c7 /Lib/asyncio/runners.py | |
parent | fdccfe09f0b10776645fdb04a0783d6864c32b21 (diff) | |
download | cpython-416c1ebd9896b394790dcb4f9f035b1a44ebe9ff.zip cpython-416c1ebd9896b394790dcb4f9f035b1a44ebe9ff.tar.gz cpython-416c1ebd9896b394790dcb4f9f035b1a44ebe9ff.tar.bz2 |
bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174)
Diffstat (limited to 'Lib/asyncio/runners.py')
-rw-r--r-- | Lib/asyncio/runners.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/asyncio/runners.py b/Lib/asyncio/runners.py index bb54b72..5fbab03 100644 --- a/Lib/asyncio/runners.py +++ b/Lib/asyncio/runners.py @@ -51,8 +51,7 @@ def run(main, *, debug=False): def _cancel_all_tasks(loop): - to_cancel = [task for task in tasks.all_tasks(loop) - if not task.done()] + to_cancel = tasks.all_tasks(loop) if not to_cancel: return |