SIGN IN SIGN UP

[3.13] gh-123321: Make Parser/myreadline.c locking safe in free-threaded build (GH-123690) (#123798)

gh-123321: Make Parser/myreadline.c locking safe in free-threaded build (GH-123690)

Use a `PyMutex` to avoid the race in mutex initialization. Use relaxed
atomics to avoid the data race on reading `_PyOS_ReadlineTState` when
checking for re-entrant calls.
(cherry picked from commit 0c080d7c77d826c1afab7bd6b73f61e714cffcb7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
M
Miss Islington (bot) committed
905288824dd6874659bf3e3aa06c6a67e47f0ac3
Parent: e68f30e
Committed by GitHub <noreply@github.com> on 9/6/2024, 8:55:42 PM