From 4993cc0a5b34dc91da2b41c50e33d809f0191355 Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Mon, 1 Oct 2012 12:53:43 -0700 Subject: utilize yield from --- Lib/concurrent/futures/_base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/concurrent/futures/_base.py') diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py index 1e098be33f..883d993ce3 100644 --- a/Lib/concurrent/futures/_base.py +++ b/Lib/concurrent/futures/_base.py @@ -198,8 +198,7 @@ def as_completed(fs, timeout=None): waiter = _create_and_install_waiters(fs, _AS_COMPLETED) try: - for future in finished: - yield future + yield from finished while pending: if timeout is None: -- cgit v1.2.1