Open rgommers opened 2 months ago
The C API working group decided to expose PyMutex in the C API https://github.com/capi-workgroup/decisions/issues/22#issuecomment-2155148479. We’re after the code freeze so it will take a special decision from the release manager for it to be included in 3.13 but it will definitely be in 3.14.
PyMutex
, PyMutex_Lock()
, and PyMutex_Unlock()
are now public in 3.13 (will be available in beta 3).
Also the critical section API (i.e., Py_BEGIN_CRITICAL_SECTION()
is now available publicly)
Relevant discussions for making
PyMutex
public in CPython for 3.13:The second link notes some current alternatives, like
PyThreadType_lock
or platform-specific locks.