From 41c26097b627cfaa15dcaa473d4300e5d0ec268d Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 6 Sep 2010 19:54:46 +0200 Subject: final fixes --- module/Scheduler.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'module/Scheduler.py') diff --git a/module/Scheduler.py b/module/Scheduler.py index 8c43ebae8..018b94e10 100644 --- a/module/Scheduler.py +++ b/module/Scheduler.py @@ -21,23 +21,12 @@ from time import sleep from Queue import Queue from threading import Thread -class Scheduler(Thread): +class Scheduler(): def __init__(self, core): - Thread.__init__(self) self.core = core self.queue = Queue() - def run(self): - while True: - j = self.queue.get() - if j.call == "quit": - break - j.start() - - def stop(self): - self.queue.put(Job(0, "quit")) - def addJob(self, time, call, args=[], kwargs={}, done=None): j = Job(time, call, args, kwargs, done) self.queue.put(j) @@ -46,7 +35,7 @@ class Job(Thread): def __init__(self, time, call, args=[], kwargs={}, done=None): Thread.__init__(self) self.time = float(time) - self.interval = 0.2 + self.interval = 0.5 self.call = call self.done = done self.args = args -- cgit v1.2.3