summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/resource_tracker.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-109593: Fix reentrancy issue in multiprocessing resource_tracker ↵Miss Islington (bot)2023-09-261-2/+32
| | | | | | | | | | | | (GH-109629) (#109897) gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629) --------- (cherry picked from commit 0eb98837b60bc58e57ad3e2b35c6b0e9ab634678) Co-authored-by: Antoine Pitrou <antoine@python.org> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-96819: multiprocessing.resource_tracker: check if length of pipe write <= ↵Miss Islington (bot)2022-10-031-2/+2
| | | | | | | | 512 (GH-96890) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> (cherry picked from commit 19ca114645bd8796cf4094e152b1fa9944da473d) Co-authored-by: Koki Saito <49419225+saito828koki@users.noreply.github.com>
* bpo-40692: Run more test_concurrent_futures tests (GH-20239)Asheesh Laroia2021-02-081-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of multiprocessing.synchronize() being missing, the test_concurrent_futures test suite now skips only the tests that require multiprocessing.synchronize(). Validate that multiprocessing.synchronize exists as part of _check_system_limits(), allowing ProcessPoolExecutor to raise NotImplementedError during __init__, rather than crashing with ImportError during __init__ when creating a lock imported from multiprocessing.synchronize. Use _check_system_limits() to disable tests of ProcessPoolExecutor on systems without multiprocessing.synchronize. Running the test suite without multiprocessing.synchronize reveals that Lib/compileall.py crashes when it uses a ProcessPoolExecutor. Therefore, change Lib/compileall.py to call _check_system_limits() before creating the ProcessPoolExecutor. Note that both Lib/compileall.py and Lib/test/test_compileall.py were attempting to sanity-check ProcessPoolExecutor by expecting ImportError. In multiprocessing.resource_tracker, sem_unlink() is also absent on platforms where POSIX semaphores aren't available. Avoid using sem_unlink() if it, too, does not exist. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-38546: multiprocessing tests stop the resource tracker (GH-17641)Victor Stinner2019-12-171-0/+13
| | | | | | | | | | Multiprocessing and concurrent.futures tests now stop the resource tracker process when tests complete. Add ResourceTracker._stop() method to multiprocessing.resource_tracker. Add _cleanup_tests() helper function to multiprocessing.util: share code between multiprocessing and concurrent.futures tests.
* bpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on ↵Antoine Pitrou2019-05-131-4/+9
| | | | Windows) (GH-13290)
* bpo-36867: Make semaphore_tracker track other system resources (GH-13222)Pierre Glaser2019-05-101-0/+213
The multiprocessing.resource_tracker replaces the multiprocessing.semaphore_tracker module. Other than semaphores, resource_tracker also tracks shared_memory segments. Patch by Pierre Glaser.