mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #16284: Prevent keeping unnecessary references to worker functions in concurrent.futures ThreadPoolExecutor.
This commit is contained in:
parent
0f77bf27ca
commit
6b973747f3
6 changed files with 36 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue