Commit Graph

11 Commits

Author SHA1 Message Date
Victor Stinner bc61315377 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()
2017-08-22 16:50:42 +02:00
Gregory P. Smith a3d91b43c2 bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (#2315)
bpo-29212: Fix the ugly ThreadPoolExecutor thread name.

Fixes the newly introduced ugly default thread name for concurrent.futures
thread.ThreadPoolExecutor threads.  They'll now resemble the old <=3.5
threading default Thread-x names by being named ThreadPoolExecutor-y_n.
2017-06-21 23:41:13 -07:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Gregory P. Smith 50abe877ee Issue #27664: Add to concurrent.futures.thread.ThreadPoolExecutor()
the ability to specify a thread name prefix.
2016-08-07 10:19:20 -07:00
Guido van Rossum cfd4661e78 Closes #21527: Add default number of workers to ThreadPoolExecutor. (Claudiu Popa.) 2014-09-02 10:39:18 -07:00
Brian Quinlan 20efceb757 Issue #21362: concurrent.futures does not validate that max_workers is proper 2014-05-17 13:51:10 -07:00
Andrew Svetlov 6b973747f3 Issue #16284: Prevent keeping unnecessary references to worker functions in concurrent.futures ThreadPoolExecutor. 2012-11-03 15:36:01 +02:00
Florent Xicluna 04842a84c3 Remove unused or redundant imports in concurrent.futures and multiprocessing. 2011-11-11 20:05:50 +01:00
Antoine Pitrou 27be5da831 Issue #11815: Remove dead code in concurrent.futures (since a blocking Queue
cannot raise queue.Empty).
2011-04-12 17:48:46 +02:00
Antoine Pitrou c13d454e84 Issue #11635: Don't use polling in worker threads and processes launched by
concurrent.futures.
2011-03-26 19:29:44 +01:00
Brian Quinlan 81c4d36928 Initial implementation of PEP 3148 2010-09-18 22:35:02 +00:00