[3.6] bpo-31249: Fix ref cycle in ThreadPoolExecutor by vstinner · Pull Request #3253 · python/cpython
added 2 commits
Add a BaseTestCase class to test_concurrent_futures to check for dangling threads and processes on all tests, not only tests using ExecutorMixin. (cherry picked from commit 489d91c)
* 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() (cherry picked from commit bc61315)
vstinner
changed the title
bpo-31249: Fix ref cycle in ThreadPoolExecutor
[3.6] bpo-31249: Fix ref cycle in ThreadPoolExecutor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters