diff options
author | mpage <mpage@meta.com> | 2024-03-06 20:46:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 20:46:36 (GMT) |
commit | c62144a02cfae412a9deb4059fae141693a6edc9 (patch) | |
tree | 27dbcef4728310e777f9f044ea0155bbb1a56a3b /Python/generated_cases.c.h | |
parent | ce0ae1d784871085059a415aa589d9bd16ea8301 (diff) | |
download | cpython-c62144a02cfae412a9deb4059fae141693a6edc9.zip cpython-c62144a02cfae412a9deb4059fae141693a6edc9.tar.gz cpython-c62144a02cfae412a9deb4059fae141693a6edc9.tar.bz2 |
gh-114271: Make `_thread.lock` thread-safe in free-threaded builds (#116433)
Previously, the `locked` field was set after releasing the lock. This reverses
the order so that the `locked` field is set while the lock is still held.
There is still one thread-safety issue where `locked` is checked prior to
releasing the lock, however, in practice that will only be an issue when
unlocking the lock is contended, which should be rare.
Diffstat (limited to 'Python/generated_cases.c.h')
0 files changed, 0 insertions, 0 deletions