Skip to content

Commit add31a7

Browse files
Use PyMutex_Lock
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
1 parent 955208d commit add31a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static int _PyTraceMalloc_TraceRef(PyObject *op, PyRefTracerEvent event,
3636
the GIL held from PyMem_RawFree(). It cannot acquire the lock because it
3737
would introduce a deadlock in _PyThreadState_DeleteCurrent(). */
3838
#define tables_lock _PyRuntime.tracemalloc.tables_lock
39-
#define TABLES_LOCK() PyMutex_LockFlags(&tables_lock, _PY_LOCK_DETACH)
39+
#define TABLES_LOCK() PyMutex_Lock(&tables_lock)
4040
#define TABLES_UNLOCK() PyMutex_Unlock(&tables_lock)
4141

4242

0 commit comments

Comments
 (0)