]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-111644: Fix support threading_cleanup() (GH-111714) (#111717)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 4 Nov 2023 00:43:53 +0000 (01:43 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Nov 2023 00:43:53 +0000 (00:43 +0000)
commit89264a31eaeb71a1349edba96c090bcf026b498c
treeb0751c9c56615b9bedc31599aaef02da108cbe6b
parent4a6116967228f8399d4e5bc4dfed6f6da81202e3
[3.11] gh-111644: Fix support threading_cleanup() (GH-111714) (#111717)

gh-111644: Fix support threading_cleanup() (GH-111714)

Copy the list of dangling threads to make sure that the list of
"Dangling thread" is complete. Previously, the list was incomplete if
threads completed just before the list was displayed.

Changes:

* Rewrite the warning to make it easier to understand.
* Use support.sleeping_retry().
* threading_cleanup() no longer copies threading._dangling,
  but only counts the number of dangling thread.
* Remove support.gc_support() call.
(cherry picked from commit f62c7ccf9abf6e0493978da9cf9ca43adcd403f9)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/support/threading_helper.py