mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
replace thread state objects' ticker and checkinterval fields with two
globals, _Py_Ticker and _Py_CheckInterval. This also implements Jeremy's shortcut in Py_AddPendingCall that zeroes out _Py_Ticker. This allows the test in the main loop to only test a single value. The gory details are at http://python.org/sf/602191
This commit is contained in:
parent
d229b3ae04
commit
d581d7792b
5 changed files with 15 additions and 10 deletions
|
@ -28,11 +28,9 @@ static PyLongObject *muladd1(PyLongObject *, wdigit, wdigit);
|
|||
static PyLongObject *divrem1(PyLongObject *, digit, digit *);
|
||||
static PyObject *long_format(PyObject *aa, int base, int addL);
|
||||
|
||||
static int ticker; /* XXX Could be shared with ceval? */
|
||||
|
||||
#define SIGCHECK(PyTryBlock) \
|
||||
if (--ticker < 0) { \
|
||||
ticker = 100; \
|
||||
if (--_Py_Ticker < 0) { \
|
||||
_Py_Ticker = _Py_CheckInterval; \
|
||||
if (PyErr_CheckSignals()) { PyTryBlock; } \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue