[Python-checkins] cpython (merge 3.3 -> default): Merge: closes issue 16643 (not ....2 as in last commit message)
terry.reedy
python-checkins at python.org
Sat Mar 9 08:26:51 CET 2013
http://hg.python.org/cpython/rev/ca56baa46d35
changeset: 82563:ca56baa46d35
parent: 82559:f87346952c10
parent: 82562:258028711466
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Sat Mar 09 02:19:33 2013 -0500
summary:
Merge: closes issue 16643 (not ....2 as in last commit message)
files:
Doc/library/sched.rst | 5 +++--
Misc/ACKS | 1 +
Misc/NEWS | 3 +++
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst
--- a/Doc/library/sched.rst
+++ b/Doc/library/sched.rst
@@ -14,12 +14,13 @@
The :mod:`sched` module defines a class which implements a general purpose event
scheduler:
-.. class:: scheduler(timefunc=time.time, delayfunc=time.sleep)
+.. class:: scheduler(timefunc=time.monotonic, delayfunc=time.sleep)
The :class:`scheduler` class defines a generic interface to scheduling events.
It needs two functions to actually deal with the "outside world" --- *timefunc*
should be callable without arguments, and return a number (the "time", in any
- units whatsoever). The *delayfunc* function should be callable with one
+ units whatsoever). If time.monotonic is not available, the *timefunc* default
+ is time.time instead. The *delayfunc* function should be callable with one
argument, compatible with the output of *timefunc*, and should delay that many
time units. *delayfunc* will also be called with the argument ``0`` after each
event is run to allow other threads an opportunity to run in multi-threaded
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -44,6 +44,7 @@
Ankur Ankan
Jon Anglin
Heidi Annexstad
+Ramchandra Apte
Éric Araujo
Alicia Arlen
Jeffrey Armstrong
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1078,6 +1078,9 @@
Documentation
-------------
+- Issue #16642: sched.scheduler timefunc initial default is time.monotonic.
+ Patch by Ramchandra Apte
+
- Issue #15465: Document the versioning macros in the C API docs rather than
the standard library docs. Patch by Kushal Das.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list