[3.14] gh-116738: Make grp module thread-safe (GH-135434) (#136658)

gh-116738: Make grp module thread-safe (GH-135434)

Make grp module methods getgrgid() and getgrnam() thread-safe when the GIL is disabled and getgrgid_r()/getgrnam_r() C APIs are not available.
---------
(cherry picked from commit 9363703bd3)

Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Miss Islington (bot) 2025-07-15 07:33:33 +02:00 committed by GitHub
parent bbbbb2e2d1
commit 55eaaab8a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 115 additions and 46 deletions

View file

@ -1384,6 +1384,13 @@ The :mod:`test.support.threading_helper` module provides support for threading t
.. versionadded:: 3.8
.. function:: run_concurrently(worker_func, nthreads, args=(), kwargs={})
Run the worker function concurrently in multiple threads.
Re-raises an exception if any thread raises one, after all threads have
finished.
:mod:`test.support.os_helper` --- Utilities for os tests
========================================================================