diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 18:11:25 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 18:11:25 +0200 |
commit | c126f738bd5be581d5321521eedc9b14a8165a0e (patch) | |
tree | 418989bfa81bfd30085f09102df53f6f58b00f14 /pyload/manager/event | |
parent | Use 'import' instead 'from' (1) (diff) | |
download | pyload-c126f738bd5be581d5321521eedc9b14a8165a0e.tar.xz |
Use 'import' instead 'from' (2)
Diffstat (limited to 'pyload/manager/event')
-rw-r--r-- | pyload/manager/event/Scheduler.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pyload/manager/event/Scheduler.py b/pyload/manager/event/Scheduler.py index d67d9063a..d7098ae10 100644 --- a/pyload/manager/event/Scheduler.py +++ b/pyload/manager/event/Scheduler.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- # @author: mkaay -from time import time +import threading + from heapq import heappop, heappush -from threading import Lock, Thread +from time import time class AlreadyCalled(Exception): @@ -99,7 +100,7 @@ class Job(object): def start(self): if self.threaded: - t = Thread(target=self.run) + t = threading.Thread(target=self.run) t.setDaemon(True) t.start() else: @@ -111,7 +112,7 @@ class PriorityQueue(object): def __init__(self): self.queue = [] - self.lock = Lock() + self.lock = threading.Lock() def __iter__(self): |