]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44336: Prevent tests hanging on child process handles on Windows (GH-26578)
authorJeremy Kloth <jeremy.kloth@gmail.com>
Tue, 22 Mar 2022 17:21:35 +0000 (11:21 -0600)
committerGitHub <noreply@github.com>
Tue, 22 Mar 2022 17:21:35 +0000 (17:21 +0000)
commit8db7610d1a7b1f90631bac26261338f27bd20727
tree88422b0dc4b1291e4762cc207222de7bc9502545
parentf47984b560f1dafe4d907cef4edadfb1746bf027
bpo-44336: Prevent tests hanging on child process handles on Windows (GH-26578)

Replace the child process `typeperf.exe` with a daemon thread that reads the performance counters directly.  This prevents the issues that arise from inherited handles in grandchild processes (see issue37531 for discussion).

We only use the load tracker when running tests in multiprocess mode. This prevents inadvertent interactions with tests expecting a single threaded environment.  Displaying load is really only helpful for buildbots running in multiprocess mode anyway..

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
Lib/test/libregrtest/main.py
Lib/test/libregrtest/win_utils.py