diff options
author | Raymond Hettinger <python@rcn.com> | 2011-06-02 01:21:42 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-06-02 01:21:42 (GMT) |
commit | 19b851d11b04d1490040ff296ebec57dc3d7eecb (patch) | |
tree | f37e6a36476ef7423c015a8718eaed16c3f0dea8 | |
parent | 88fc66179b1d05f95cb7ac58f4bceef366d0ff11 (diff) | |
download | cpython-19b851d11b04d1490040ff296ebec57dc3d7eecb.zip cpython-19b851d11b04d1490040ff296ebec57dc3d7eecb.tar.gz cpython-19b851d11b04d1490040ff296ebec57dc3d7eecb.tar.bz2 |
sys.checkinterval() now refreshes the current countdown ticker.
-rw-r--r-- | Misc/NEWS | 7 | ||||
-rw-r--r-- | Python/sysmodule.c | 1 |
2 files changed, 8 insertions, 0 deletions
@@ -16,6 +16,13 @@ Core and Builtins Library ------- +- sys.setcheckinterval() now updates the current ticker count as well as updating + the check interval, so if the user decreases the check interval, the ticker + doesn't have to wind down to zero from the old starting point before the new + interval takes effect. And if the user increases the interval, it makes sure + the new limit takes effect right away rather have an early task switch before + recognizing the new interval. + - Issue #12085: Fix an attribute error in subprocess.Popen destructor if the constructor has failed, e.g. because of an undeclared keyword argument. Patch written by Oleg Oshmyan. diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 00b3aa4..692805b 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -466,6 +466,7 @@ sys_setcheckinterval(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "i:setcheckinterval", &_Py_CheckInterval)) return NULL; + _Py_Ticker = _Py_CheckInterval; Py_INCREF(Py_None); return Py_None; } |