]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117293: Fix race condition in run_workers.py (#117298)
authorSam Gross <colesbury@gmail.com>
Mon, 8 Apr 2024 14:47:42 +0000 (10:47 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2024 14:47:42 +0000 (10:47 -0400)
commit26a680a58524fe39eecb243e37adfa6e157466f6
tree771940c33d30b40d10b1880465b45a2a0306ef7b
parent59864edd572b5c0cc3be58087a9ea3a700226146
gh-117293: Fix race condition in run_workers.py (#117298)

The worker thread may still be alive after it enqueues it's last result,
which can lead to a delay of 30 seconds after the test finishes. This
happens much more frequently in the free-threaded build with the GIL
disabled.

This changes run_workers.py to track of live workers by enqueueing a
`WorkerExited()` instance before the worker exits.
Lib/test/libregrtest/run_workers.py