◐ Shell
clean mode source ↗

bpo-31249: Fix ref cycle in ThreadPoolExecutor by vstinner · Pull Request #3178 · python/cpython

vstinner

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.

GadgetSteve pushed a commit to GadgetSteve/cpython that referenced this pull request

Sep 10, 2017
* 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()