summaryrefslogtreecommitdiffstats
path: root/Python/frozenmain.c
diff options
context:
space:
mode:
authormpage <mpage@meta.com>2024-02-16 18:29:25 (GMT)
committerGitHub <noreply@github.com>2024-02-16 18:29:25 (GMT)
commitf366e215044e348659df814c27bf70e78907df21 (patch)
tree046a35e45d76f4db71825d63849009912fce0ea0 /Python/frozenmain.c
parent13addd2bbdcbf96c5ea26a0f425c049f1b71e945 (diff)
downloadcpython-f366e215044e348659df814c27bf70e78907df21.zip
cpython-f366e215044e348659df814c27bf70e78907df21.tar.gz
cpython-f366e215044e348659df814c27bf70e78907df21.tar.bz2
gh-114271: Make `thread._rlock` thread-safe in free-threaded builds (#115102)
The ID of the owning thread (`rlock_owner`) may be accessed by multiple threads without holding the underlying lock; relaxed atomics are used in place of the previous loads/stores. The number of times that the lock has been acquired (`rlock_count`) is only ever accessed by the thread that holds the lock; we do not need to use atomics to access it.
Diffstat (limited to 'Python/frozenmain.c')
0 files changed, 0 insertions, 0 deletions