mirror of
https://github.com/python/cpython.git
synced 2026-05-07 21:20:55 -04:00
718fc5b139
gh-136870: fix data race in `PyThreadState_Clear` on `sys_tracing_threads` (GH-136951)
In free-threading, multiple threads can be cleared concurrently as such the modifications on `sys_tracing_threads` should be done while holding the profile lock, otherwise it can race with other threads setting up profiling.
(cherry picked from commit f183996eb7)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miscellaneous source files for the main Python shared library