]> granicus.if.org Git - python/commit
bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 22 Aug 2017 14:50:42 +0000 (16:50 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Aug 2017 14:50:42 +0000 (16:50 +0200)
commitbc61315377056fe362b744d9c44e17cd3178ce54
tree5bb9c1fd7e8e92230aa0f328665c45a052c43967
parent5fe59f8e3a0a56a155c18f9d581205ec533764b6
bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)

* bpo-31249: Fix ref cycle in ThreadPoolExecutor

concurrent.futures: WorkItem.run() used by ThreadPoolExecutor now
breaks a reference cycle between an exception object and the WorkItem
object. ThreadPoolExecutor.shutdown() now also clears its threads
set.

* shutdown() now only clears threads if wait is true.

* Revert changes on shutdown()
Lib/concurrent/futures/thread.py
Misc/NEWS.d/next/Library/2017-08-22-12-44-48.bpo-31249.STPbb9.rst [new file with mode: 0644]