Skip to content

Commit 7a1ae46

Browse files
committed
comment on the necessity of the result container
1 parent ab4182b commit 7a1ae46

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/concurrent/futures/_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ def map(self, fn, *iterables, timeout=None, chunksize=1, buffersize=None):
621621
# collected independently of the result_iterator closure.
622622
executor_weakref = weakref.ref(self)
623623

624+
# used by the result_iterator to avoid keeping a reference to the result
624625
result = collections.deque(maxlen=1)
625626
# Yield must be hidden in closure so that the futures are submitted
626627
# before the first iterator value is required.

0 commit comments

Comments
 (0)