[Python-checkins] cpython: revert cset 6a0da9b65e54 against sched.py committed by accident
giampaolo.rodola
python-checkins at python.org
Wed Nov 23 00:03:21 CET 2011
http://hg.python.org/cpython/rev/6132f46c2ab0
changeset: 73710:6132f46c2ab0
parent: 73708:029ad97883ef
user: Giampaolo Rodola' <g.rodola at gmail.com>
date: Wed Nov 23 00:03:15 2011 +0100
summary:
revert cset 6a0da9b65e54 against sched.py committed by accident
files:
Lib/sched.py | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/Lib/sched.py b/Lib/sched.py
--- a/Lib/sched.py
+++ b/Lib/sched.py
@@ -35,9 +35,6 @@
__all__ = ["scheduler"]
class Event(namedtuple('Event', 'time, priority, action, argument, kwargs')):
- def __init__(self, *args, **kwargs):
- super(Event, self).__init__(*args, **kwargs)
- self._scheduled = False
def __eq__(s, o): return (s.time, s.priority) == (o.time, o.priority)
def __ne__(s, o): return (s.time, s.priority) != (o.time, o.priority)
def __lt__(s, o): return (s.time, s.priority) < (o.time, o.priority)
@@ -62,7 +59,6 @@
"""
event = Event(time, priority, action, argument, kwargs)
- event._scheduled = True
heapq.heappush(self._queue, event)
return event # The ID
@@ -85,9 +81,6 @@
self._queue.remove(event)
heapq.heapify(self._queue)
- def is_scheduled(self, event):
- return event._scheduled
-
def empty(self):
"""Check whether the queue is empty."""
return not self._queue
@@ -129,7 +122,6 @@
# Verify that the event was not removed or altered
# by another thread after we last looked at q[0].
if event is checked_event:
- event._scheduled = False
action(*argument, **kwargs)
delayfunc(0) # Let other threads run
else:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list