summaryrefslogtreecommitdiffstats
path: root/Lib/test/_test_multiprocessing.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31234: test_multiprocessing: wait 30 seconds (#3599)Victor Stinner2017-09-151-14/+17
| | | | Give 30 seconds to join_process(), instead of 5 or 10 seconds, to wait until the process completes.
* bpo-31234: Add support.join_thread() helper (#3587)Victor Stinner2017-09-141-11/+17
| | | | join_thread() joins a thread but raises an AssertionError if the thread is still alive after timeout seconds.
* bpo-18966: non-daemonic threads created by a multiprocessing.Process should ↵Antoine Pitrou2017-08-161-0/+26
| | | | | | | | be joined on exit (#3111) * bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit * Add NEWS blurb
* bpo-31069, test_multiprocessing: Fix dangling process (#3103)Victor Stinner2017-08-161-1/+2
| | | | Fix a warning about dangling processes in test_rapid_restart() of _test_multiprocessing: join the process.
* bpo-26762: _test_multiprocessing reports dangling (#3064)Victor Stinner2017-08-101-0/+6
| | | | _test_multiprocessing now marks the test as ENV_CHANGED on dangling process or thread.
* bpo-26762: test_multiprocessing close more queues (#2855)Victor Stinner2017-07-251-3/+15
| | | | | | * Close explicitly queues to make sure that we don't leave dangling threads * test_queue_in_process(): remove unused queue * test_access() joins also the process to fix a random warning
* test_multiprocessing detects dangling per test case (#2841)Victor Stinner2017-07-241-14/+67
| | | | | | | | | | | | | bpo-26762: test_multiprocessing now detects dangling processes and threads per test case classes: * setUpClass()/tearDownClass() of mixin classes now check if multiprocessing.process._dangling or threading._dangling was modified to detect "dangling" processses and threads. * ManagerMixin.tearDownClass() now also emits a warning if it still has more than one active child process after 5 seconds. * tearDownModule() now checks for dangling processes and threads before sleep 500 ms. And it now only sleeps if there is a least one dangling process or thread.
* test_multiprocessing: Fix dangling process/thread (#2850)Victor Stinner2017-07-241-2/+22
| | | | | | | bpo-26762: Fix more dangling processes and threads in test_multiprocessing: * Queue: call close() followed by join_thread() * Process: call join() or self.addCleanup(p.join)
* bpo-26762: Avoid daemon process in _test_multiprocessing (#2842)Victor Stinner2017-07-241-2/+4
| | | | | test_level() of _test_multiprocessing._TestLogging now uses regular processes rather than daemon processes to prevent zombi processes (to not "leak" processes).
* bpo-26732: fix too many fds in processes started with the "forkserver" ↵Antoine Pitrou2017-07-221-0/+34
| | | | | | | | | | method (#2813) * bpo-26732: fix too many fds in processes started with the "forkserver" method A child process would inherit as many fds as the number of still-running children. * Add blurb and test comment
* Fix test failure without ctypes (#2802)Antoine Pitrou2017-07-211-1/+1
|
* bpo-19896: Add typecodes 'q' and 'Q' to multiprocessing.sharedctypes (#2741)Gareth Rees2017-07-211-5/+12
| | | | | | | | | | * bpo-19896: Add typcodes 'q' and 'Q' to multiprocessing.sharedctypes. Patch by Antony Lee. * Add NEWS entry. * Slightly tweak NEWS entry Make it clear this is more of a fix rather than a new feature.
* bpo-30794: added kill() method to multiprocessing.Process (#2528)Vitor Pereira2017-07-181-7/+15
| | | | | | | | | | | | | | * bpo-30794: added kill() method to multiprocessing.Process * Added entries to documentation and NEWS * Refactored test_terminate and test_kill * Fix SIGTERM and SIGKILL being used on Windows for the tests * Added "versionadded" marker to the documentation * Fix trailing whitespace in doc
* bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)Antoine Pitrou2017-07-041-7/+59
| | | | | | * bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` * Add NEWS blurb
* Clear potential ref cycle between Process and Process target (#2470)Antoine Pitrou2017-06-281-0/+18
| | | | | | | | | * Clear potential ref cycle between Process and Process target Besides Process.join() not being called, this was an indirect cause of bpo-30775. The threading module already does this. * Add issue reference
* bpo-30775: Fix refleaks in test_multiprocessing (#2467)Antoine Pitrou2017-06-281-2/+17
| | | Forgetting to call Process.join() can keep some resources alive.
* Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)Antoine Pitrou2017-06-241-0/+36
| | | | | | | | | | * Fix bpo-30596: Add close() method to multiprocessing.Process * Raise ValueError if close() is called before the Process is finished running * Add docs * Add NEWS blurb
* bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (#2148)Victor Stinner2017-06-131-1/+2
| | | | | _test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a timeout of 1 second on Queue.get(), instead of 0.1 second, for slow buildbots.
* bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)Antoine Pitrou2017-06-131-0/+63
| | | | | | | | | | | * bpo-24484: Avoid race condition in multiprocessing cleanup The finalizer registry can be mutated while inspected by multiprocessing at process exit. * Use test.support.start_threads() * Add Misc/NEWS
* Fix bpo-30589: improve Process.exitcode with forkserver (#1989)Antoine Pitrou2017-06-121-2/+37
| | | | | | | | * Fix bpo-30589: improve Process.exitcode with forkserver When the child is killed, Process.exitcode should return -signum, not 255. * Add Misc/NEWS
* bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc ↵grzgrzgrz32017-05-251-0/+14
| | | | | | | | | | | | | | | | | | (#1683) * bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc Queue background running thread was not handling exceptions correctly. Any exception occurred inside thread (putting unpickable object) cause feeder to finish running. After that every message put into queue is silently ignored. * bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc Queue background running thread was not handling exceptions correctly. Any exception occurred inside thread (putting unpickable object) cause feeder to finish running. After that every message put into queue is silently ignored.
* bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601)Xiang Zhang2017-05-171-0/+36
| | | | | Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could raise AttributeError due to not setting _poll in __setstate__.
* Relax test timing (bpo-29861) to avoid sporadic failures (#1120)Antoine Pitrou2017-04-141-0/+1
|
* bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-693)Xiang Zhang2017-03-291-1/+58
| | | | | an exception raised at the very first of an iterable would cause pools behave abnormally (swallow the exception or hang)
* bpo-29861: release references to multiprocessing Pool tasks (#743)Antoine Pitrou2017-03-241-0/+28
| | | | | | | | | | * bpo-29861: release references to multiprocessing Pool tasks Release references to tasks, their arguments and their results as soon as they are finished, instead of keeping them alive until another task arrives. * Comments in test
* Issue #28779: multiprocessing.set_forkserver_preload() would crash the ↵Antoine Pitrou2016-12-101-0/+13
|\ | | | | | | forkserver process if a preloaded module instantiated some multiprocessing objects such as locks.
| * Issue #28779: multiprocessing.set_forkserver_preload() would crash the ↵Antoine Pitrou2016-12-101-0/+13
| | | | | | | | forkserver process if a preloaded module instantiated some multiprocessing objects such as locks.
| * Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
| |
| * Issue #25654:Victor Stinner2016-03-251-5/+13
| | | | | | | | | | | | | | | | | | * multiprocessing: open file with closefd=False to avoid ResourceWarning * _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a previous test forgot to remove TESTFN) * test_sys_exit(): remove TESTFN after each loop iteration Initial patch written by Serhiy Storchaka.
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-1/+1
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | Fixes issue #6766: Updated multiprocessing Proxy Objects to support nestingDavin Potts2016-09-071-2/+68
| |
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
| |
* | Issue #25654:Victor Stinner2016-03-251-5/+13
| | | | | | | | | | | | | | | | | | * multiprocessing: open file with closefd=False to avoid ResourceWarning * _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a previous test forgot to remove TESTFN) * test_sys_exit(): remove TESTFN after each loop iteration Initial patch written by Serhiy Storchaka.
* | Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) ↵Antoine Pitrou2016-03-151-9/+16
|\ \ | |/ | | | | was untested.
| * Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) ↵Antoine Pitrou2016-03-151-9/+16
| | | | | | | | was untested.
* | Issue #23992: multiprocessing: make MapResult not fail-fast upon exception.Charles-François Natali2016-02-101-0/+24
|/
* Fix remaining tests and remove an unused import.Berker Peksag2015-05-061-3/+3
|
* Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.Serhiy Storchaka2015-04-231-2/+8
|\ | | | | | | Patch by Davin Potts.
| * Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.Serhiy Storchaka2015-04-231-2/+8
| | | | | | | | Patch by Davin Potts.
* | Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() nowSerhiy Storchaka2015-03-131-0/+46
|\ \ | |/ | | | | | | handle exceptions raised by an iterator. Patch by Alon Diamant and Davin Potts.
| * Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() nowSerhiy Storchaka2015-03-131-0/+46
| | | | | | | | | | handle exceptions raised by an iterator. Patch by Alon Diamant and Davin Potts.
* | Issue #22853: Added regression test for using multiprocessing.Queue at importSerhiy Storchaka2015-03-061-0/+21
|\ \ | |/ | | | | time. Patch by Davin Potts.
| * Issue #22853: Added regression test for using multiprocessing.Queue at importSerhiy Storchaka2015-03-061-0/+21
| | | | | | | | time. Patch by Davin Potts.
* | Issue #21849: Ported from 2.7 tests for non-ASCII data.Serhiy Storchaka2015-02-131-7/+13
|\ \ | |/
| * Issue #21849: Ported from 2.7 tests for non-ASCII data.Serhiy Storchaka2015-02-131-7/+13
| |
* | (Merge 3.4) test_multiprocessing: tolerate a delta of 30 ms because of badVictor Stinner2015-02-051-2/+4
|\ \ | |/ | | | | clock resolution on Windows
| * test_multiprocessing: tolerate a delta of 30 ms because of bad clock resolutionVictor Stinner2015-02-051-2/+4
| | | | | | | | on Windows
* | Issue #21566: Make use of socket.listen() default backlog.Charles-François Natali2014-07-231-2/+2
|/
* Issue #20980: Stop wrapping exception when using ThreadPool.Richard Oudkerk2014-03-231-0/+11
|
* Issue #20114: Double timeout in test_semaphore_tracker() to reduceRichard Oudkerk2014-02-211-1/+1
| | | | chance of sporadic failures.