diff options
author | mpage <mpage@meta.com> | 2024-02-16 18:29:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 18:29:25 (GMT) |
commit | f366e215044e348659df814c27bf70e78907df21 (patch) | |
tree | 046a35e45d76f4db71825d63849009912fce0ea0 /Python/pylifecycle.c | |
parent | 13addd2bbdcbf96c5ea26a0f425c049f1b71e945 (diff) | |
download | cpython-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/pylifecycle.c')
0 files changed, 0 insertions, 0 deletions