summaryrefslogtreecommitdiffstats
path: root/Python/dynload_hpux.c
diff options
context:
space:
mode:
authorBrett Simmers <swtaarrs@users.noreply.github.com>2024-05-02 22:25:36 (GMT)
committerGitHub <noreply@github.com>2024-05-02 22:25:36 (GMT)
commitf8290df63f1fd970dfd6bbfdc9a86341a9f97d05 (patch)
tree295dd866e9306b1d8ed7eda44872fd1d151b391d /Python/dynload_hpux.c
parent4e2caf2aa046bf80e87e9b858837bb527459a034 (diff)
downloadcpython-f8290df63f1fd970dfd6bbfdc9a86341a9f97d05.zip
cpython-f8290df63f1fd970dfd6bbfdc9a86341a9f97d05.tar.gz
cpython-f8290df63f1fd970dfd6bbfdc9a86341a9f97d05.tar.bz2
gh-116738: Make `_codecs` module thread-safe (#117530)
The module itself is a thin wrapper around calls to functions in `Python/codecs.c`, so that's where the meaningful changes happened: - Move codecs-related state that lives on `PyInterpreterState` to a struct declared in `pycore_codecs.h`. - In free-threaded builds, add a mutex to `codecs_state` to synchronize operations on `search_path`. Because `search_path_mutex` is used as a normal mutex and not a critical section, we must be extremely careful with operations called while holding it. - The codec registry is explicitly initialized as part of `_PyUnicode_InitEncodings` to simplify thread-safety.
Diffstat (limited to 'Python/dynload_hpux.c')
0 files changed, 0 insertions, 0 deletions