We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
_PyCriticalSection_BeginSlow
1 parent 5e7d423 commit 9de6d1aCopy full SHA for 9de6d1a
include/pybind11/detail/internals.h
@@ -249,7 +249,8 @@ class pycritical_section {
249
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x030E00C1 // 3.14.0rc1
250
PyCriticalSection_BeginMutex(&cs, &mutex.mutex);
251
# else
252
- _PyCriticalSection_BeginMutex(_PyThreadState_GET(), &cs, &mutex.mutex);
+ // Use the slow path of internal API `_PyCriticalSection_BeginMutex` for older versions
253
+ _PyCriticalSection_BeginSlow(&cs, &mutex.mutex);
254
# endif
255
}
256
~pycritical_section() { PyCriticalSection_End(&cs); }
0 commit comments