Skip to content

Commit f8b06ae

Browse files
committed
Lock the iterable for list.__init__()
1 parent ac556a2 commit f8b06ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/listobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,9 +1362,9 @@ _list_extend(PyListObject *self, PyObject *iterable)
13621362
Py_END_CRITICAL_SECTION2();
13631363
}
13641364
else {
1365-
Py_BEGIN_CRITICAL_SECTION(self);
1365+
Py_BEGIN_CRITICAL_SECTION2(self, iterable);
13661366
res = list_extend_iter_lock_held(self, iterable);
1367-
Py_END_CRITICAL_SECTION();
1367+
Py_END_CRITICAL_SECTION2();
13681368
}
13691369
return res;
13701370
}

0 commit comments

Comments
 (0)