We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bd41af commit c483430Copy full SHA for c483430
Include/internal/pycore_critical_section.h
@@ -104,12 +104,14 @@ extern "C" {
104
# define Py_END_CRITICAL_SECTION2() \
105
_PyCriticalSection2_End(&_cs2); \
106
}
107
+#define _Py_CRITICAL_SECTION_ASSERT_HELD(op) assert(PyMutex_IsLocked(&_PyObject_CAST(op)->ob_mutex))
108
#else /* !Py_GIL_DISABLED */
109
// The critical section APIs are no-ops with the GIL.
110
# define Py_BEGIN_CRITICAL_SECTION(op)
111
# define Py_END_CRITICAL_SECTION()
112
# define Py_BEGIN_CRITICAL_SECTION2(a, b)
113
# define Py_END_CRITICAL_SECTION2()
114
+#define _Py_CRITICAL_SECTION_ASSERT_HELD(op)
115
#endif /* !Py_GIL_DISABLED */
116
117
typedef struct {
0 commit comments