Quansight-Labs / free-threaded-compatibility

A central repository to keep track of the status of work on and support for free-threaded CPython (see PEP 703), with a focus on the scientific and ML/AI ecosystem
https://py-free-threading.github.io/
MIT License
155 stars 22 forks source link

Add note explicitly recommending PyMutex over PyThread_type_lock #72

Closed lysnikolaou closed 2 months ago

lysnikolaou commented 2 months ago

Needed because the linked NumPy PR uses PyThread_type_lock. Also link to the PR that replaced that with PyMutex.

ngoldbaum commented 2 months ago

I think that makes things clearer. Probably worth adding a whole section with a canned example so people don't need to dive through old PR diffs but we can do that later. Also hopefully not that many people need to worry about the guts of thread-unsafe C extensions like this!