[Python-checkins] cpython (2.7): sys.checkinterval() now refreshes the current countdown ticker.
raymond.hettinger
python-checkins at python.org
Thu Jun 2 03:32:41 CEST 2011
http://hg.python.org/cpython/rev/4af63c08f68a
changeset: 70601:4af63c08f68a
branch: 2.7
parent: 70598:bbaf419e7d0a
user: Raymond Hettinger <python at rcn.com>
date: Wed Jun 01 18:21:42 2011 -0700
summary:
sys.checkinterval() now refreshes the current countdown ticker.
files:
Misc/NEWS | 7 +++++++
Python/sysmodule.c | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,13 @@
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
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -466,6 +466,7 @@
{
if (!PyArg_ParseTuple(args, "i:setcheckinterval", &_Py_CheckInterval))
return NULL;
+ _Py_Ticker = _Py_CheckInterval;
Py_INCREF(Py_None);
return Py_None;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list