summaryrefslogtreecommitdiff
path: root/Lib/concurrent/futures/thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/concurrent/futures/thread.py')
-rw-r--r--Lib/concurrent/futures/thread.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py
index 95bb682565..f9beb0f7f7 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: