mirror of https://github.com/python/cpython.git
Arrange for PyErr_CheckSignals() to be called via Py_AddPendingCall().
This avoids having to call sigcheck() (the same routine by its old name :-) in the ticker code in ceval.c's main interpreter loop.
This commit is contained in:
parent
ad74fa6674
commit
fcdd0e40a4
|
@ -115,6 +115,7 @@ signal_handler(sig_num)
|
||||||
#endif
|
#endif
|
||||||
is_tripped++;
|
is_tripped++;
|
||||||
Handlers[sig_num].tripped = 1;
|
Handlers[sig_num].tripped = 1;
|
||||||
|
Py_AddPendingCall((int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL);
|
||||||
#ifdef WITH_THREAD
|
#ifdef WITH_THREAD
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -523,7 +524,7 @@ PyErr_CheckSignals()
|
||||||
Py_DECREF(arglist);
|
Py_DECREF(arglist);
|
||||||
}
|
}
|
||||||
if (!result)
|
if (!result)
|
||||||
return 1;
|
return -1;
|
||||||
|
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
}
|
}
|
||||||
|
@ -541,6 +542,7 @@ PyErr_SetInterrupt()
|
||||||
{
|
{
|
||||||
is_tripped++;
|
is_tripped++;
|
||||||
Handlers[SIGINT].tripped = 1;
|
Handlers[SIGINT].tripped = 1;
|
||||||
|
Py_AddPendingCall((int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue