◐ Shell
clean mode source ↗

[3.6] bpo-31249: Fix ref cycle in ThreadPoolExecutor by vstinner · Pull Request #3253 · python/cpython

added 2 commits

August 31, 2017 15:50
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 vstinner changed the title bpo-31249: Fix ref cycle in ThreadPoolExecutor [3.6] bpo-31249: Fix ref cycle in ThreadPoolExecutor

Sep 1, 2017