8000
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.
_Py_IsOwnedByCurrentThread()
1 parent 5a4d3df commit a5eeb83Copy full SHA for a5eeb83
Include/object.h
@@ -303,7 +303,11 @@ _Py_ThreadId(void)
303
static inline Py_ALWAYS_INLINE int
304
_Py_IsOwnedByCurrentThread(PyObject *ob)
305
{
306
+#ifdef _Py_THREAD_SANITIZER
307
+ return _Py_atomic_load_uintptr_relaxed(&ob->ob_tid) == _Py_ThreadId();
308
+#else
309
return ob->ob_tid == _Py_ThreadId();
310
+#endif
311
}
312
#endif
313
Tools/tsan/suppressions_free_threading.txt
@@ -14,7 +14,6 @@ race:set_allocator_unlocked
14
race:_add_to_weak_set
15
race:_in_weak_set
16
race:_mi_heap_delayed_free_partial
17
-race:_Py_IsOwnedByCurrentThread
18
race:_PyEval_EvalFrameDefault
19
race:_PyFunction_SetVersion
20
race:_PyImport_AcquireLock
0 commit comments