diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-11-03 13:36:01 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-11-03 13:36:01 (GMT) |
commit | 6b973747f3c5e31afd89f6a7d79bc9f3f1628710 (patch) | |
tree | 10127b702286a312c859d4bf9922716f8ad402bf /Lib/concurrent/futures/thread.py | |
parent | 0f77bf27ca372655104884bf1e1ecaf014e8a61a (diff) | |
download | cpython-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/concurrent/futures/thread.py')
-rw-r--r-- | Lib/concurrent/futures/thread.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py index 95bb682..f9beb0f 100644 --- a/Lib/concurrent/futures/thread.py +++ b/Lib/concurrent/futures/thread.py @@ -63,6 +63,8 @@ def _worker(executor_reference, work_queue): work_item = work_queue.get(block=True) if work_item is not None: work_item.run() + # Delete references to object. See issue16284 + del work_item continue executor = executor_reference() # Exit if: |