bpo-44422: Fix threading.enumerate() reentrant call (GH-26727)


The threading.enumerate() function now uses a reentrant lock to
prevent a hang on reentrant call.
(cherry picked from commit 243fd01047ddce1a7eb0f99a49732d123e942c63)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 files changed