summaryrefslogtreecommitdiffstats
path: root/Lib/concurrent/futures/thread.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31783: Fix a race condition creating workers during shutdown (#13171)Brian Quinlan2019-06-281-2/+6
| | | | | | * bpo-31783: Fix a race condition while creating workers during interpreter shutdown * 📜🤖 Added by blurb_it.
* Fix typo in Lib/concurrent/futures/thread.py (GH-13953)ubordignon2019-06-151-1/+1
|
* [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)Serhiy Storchaka2019-06-051-17/+1
| | | Turn deprecation warnings added in 3.8 into TypeError.
* bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618)Inada Naoki2019-05-281-3/+8
|
* bpo-24882: Let ThreadPoolExecutor reuse idle threads before creating new ↵Sean2019-05-221-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread (#6375) * Fixes issue 24882 * Add news file entry for change. * Change test_concurrent_futures.ThreadPoolShutdownTest Adjust the shutdown test so that, after submitting three jobs to the executor, the test checks for less than three threads, instead of looking for exactly three threads. If idle threads are being recycled properly, then we should have less than three threads. * Switched idle count to semaphor, Updated tests As suggested by reviewer tomMoral, swapped lock-protected counter with a semaphore to track the number of unused threads. Adjusted test_threads_terminate to wait for completiton of the previous future before submitting a new one (and checking the number of threads used). Also added a new test to confirm the thread pool can be saturated. * Updates tests as requested by pitrou. * Correct minor whitespace error. * Make test_saturation faster
* bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)Serhiy Storchaka2019-05-061-0/+1
|
* bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)Serhiy Storchaka2019-04-011-1/+16
| | | | | | | | | | | | | | | | | | | | | | Deprecated passing the following arguments as keyword arguments: - "func" in functools.partialmethod(), weakref.finalize(), profile.Profile.runcall(), cProfile.Profile.runcall(), bdb.Bdb.runcall(), trace.Trace.runfunc() and curses.wrapper(). - "function" in unittest.addModuleCleanup() and unittest.TestCase.addCleanup(). - "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor and concurrent.futures.ProcessPoolExecutor. - "callback" in contextlib.ExitStack.callback(), contextlib.AsyncExitStack.callback() and contextlib.AsyncExitStack.push_async_callback(). - "c" and "typeid" in the create() method of multiprocessing.managers.Server and multiprocessing.managers.SharedMemoryServer. - "obj" in weakref.finalize(). Also allowed to pass arbitrary keyword arguments (even "self" and "func") if the above arguments are passed as positional argument.
* bpo-35133: Fix mistakes when concatenate string literals on different lines. ↵Serhiy Storchaka2018-11-051-1/+1
| | | | | | | | | | (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings.
* bpo-33097: Fix submit accepting callable after executor shutdown by ↵Mark Nemec2018-04-101-0/+7
| | | | | | interpreter exit (GH-6144) Executors in concurrent.futures accepted tasks after executor was shutdown by interpreter exit. Tasks were left in PENDING state forever. This fix changes submit to instead raise a RuntimeError.
* bpo-32576: use queue.SimpleQueue in critical places (#5216)Antoine Pitrou2018-01-181-1/+1
| | | | Where a queue may be invoked from a weakref callback, we need to use the reentrant SimpleQueue.
* bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor (#4241)Antoine Pitrou2017-11-041-3/+48
| | | | | | * bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor * Fix docstring
* bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)Victor Stinner2017-08-221-2/+4
| | | | | | | | | | | | | * 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()
* bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (#2315)Gregory P. Smith2017-06-221-1/+7
| | | | | | | 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.
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
|
* Issue #27664: Add to concurrent.futures.thread.ThreadPoolExecutor()Gregory P. Smith2016-08-071-3/+8
| | | | the ability to specify a thread name prefix.
* Closes #21527: Add default number of workers to ThreadPoolExecutor. (Claudiu ↵Guido van Rossum2014-09-021-1/+6
| | | | Popa.)
* Issue #21362: concurrent.futures does not validate that max_workers is properBrian Quinlan2014-05-171-0/+3
|
* Issue #16284: Prevent keeping unnecessary references to worker functions in ↵Andrew Svetlov2012-11-031-0/+2
| | | | concurrent.futures ThreadPoolExecutor.
* Remove unused or redundant imports in concurrent.futures and multiprocessing.Florent Xicluna2011-11-111-1/+1
|
* Issue #11815: Remove dead code in concurrent.futures (since a blocking QueueAntoine Pitrou2011-04-121-8/+4
| | | | cannot raise queue.Empty).
* Issue #11635: Don't use polling in worker threads and processes launched byAntoine Pitrou2011-03-261-31/+29
| | | | concurrent.futures.
* Initial implementation of PEP 3148Brian Quinlan2010-09-181-0/+136