Skip to content

Commit d9cc016

Browse files
authored
Modify critical section assertion in _elementtree.c
Commented out critical section assertion for ElementObject.
1 parent 870d3a3 commit d9cc016

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_elementtree.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,8 @@ ptr_wise_atomic_memmove(ElementObject *a, PyObject **dest, PyObject **src, Py_ss
18711871
#ifndef Py_GIL_DISABLED
18721872
memmove(dest, src, n * sizeof(PyObject *));
18731873
#else
1874-
_Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(a);
1874+
// XXX: maybe a critical section isn't needed for ElementObject?
1875+
// _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(a);
18751876
if (_Py_IsOwnedByCurrentThread((PyObject *)a) && !_PyObject_GC_IS_SHARED(a)) {
18761877
// No other threads can read this list concurrently
18771878
memmove(dest, src, n * sizeof(PyObject *));

0 commit comments

Comments
 (0)