Issue #16284: Prevent keeping unnecessary references to worker functions in concurrent.futures ThreadPoolExecutor.

This commit is contained in:
Andrew Svetlov 2012-11-03 15:36:01 +02:00
parent 0f77bf27ca
commit 6b973747f3
6 changed files with 36 additions and 0 deletions

View file

@ -243,10 +243,14 @@ class Queue(object):
if wacquire is None:
send(obj)
# Delete references to object. See issue16284
del obj
else:
wacquire()
try:
send(obj)
# Delete references to object. See issue16284
del obj
finally:
wrelease()
except IndexError: