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 d30ace8 commit baec5bcCopy full SHA for baec5bc
Modules/_threadmodule.c
@@ -809,9 +809,8 @@ iter_locked_next(PyObject *op)
809
// we cannot use Py_BEGIN_CRITICAL_SECTION as it is not available in the normal build
810
PyMutex_Lock(&(lz->lock));
811
812
- PyObject *it = lz->it;
813
- result = PyIter_Next(it);
814
- if (result == NULL) {
+ int v = PyIter_NextItem(lz->it, &result);
+ if (v == -1) {
815
/* Note: StopIteration is already cleared by PyIter_Next() */
816
/* If PyErr_Occurred() we will also return NULL*/
817
}
0 commit comments