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 939308e commit c094349Copy full SHA for c094349
Python/ceval.c
@@ -266,12 +266,14 @@ Py_SetRecursionLimit(int new_limit)
266
{
267
PyInterpreterState *interp = _PyInterpreterState_GET();
268
_PyEval_StopTheWorld(interp);
269
+ HEAD_LOCK(interp->runtime);
270
interp->ceval.recursion_limit = new_limit;
271
for (PyThreadState *p = interp->threads.head; p != NULL; p = p->next) {
272
int depth = p->py_recursion_limit - p->py_recursion_remaining;
273
p->py_recursion_limit = new_limit;
274
p->py_recursion_remaining = new_limit - depth;
275
}
276
+ HEAD_UNLOCK(interp->runtime);
277
_PyEval_StartTheWorld(interp);
278
279
0 commit comments