summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-11-03 13:36:01 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-11-03 13:36:01 (GMT)
commit6b973747f3c5e31afd89f6a7d79bc9f3f1628710 (patch)
tree10127b702286a312c859d4bf9922716f8ad402bf /Lib/multiprocessing
parent0f77bf27ca372655104884bf1e1ecaf014e8a61a (diff)
downloadcpython-6b973747f3c5e31afd89f6a7d79bc9f3f1628710.zip
cpython-6b973747f3c5e31afd89f6a7d79bc9f3f1628710.tar.gz
cpython-6b973747f3c5e31afd89f6a7d79bc9f3f1628710.tar.bz2
Issue #16284: Prevent keeping unnecessary references to worker functions in concurrent.futures ThreadPoolExecutor.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/queues.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index 37271fb..f6f02b6 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -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: