[New-bugs-announce] [issue27144] concurrent.futures.as_completed() memory inefficiency

Grzegorz Grzywacz report at bugs.python.org
Sat May 28 09:25:35 EDT 2016

New submission from Grzegorz Grzywacz:

as_complite generator keeps reference of all passed futures until StopIteration. It may lead to serious memory inefficiency.

Solution is to remove reference from lists and yield future ad-hoc.

I have submitted patch and reproduce sample.

I can create backport for older versions if needed.

components: Library (Lib)
files: reproduce.py
messages: 266552
nosy: bquinlan, grzgrzgrz3
priority: normal
severity: normal
status: open
title: concurrent.futures.as_completed() memory inefficiency
type: resource usage
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43037/reproduce.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list