summaryrefslogtreecommitdiffstats
path: root/pyload/manager/event/Scheduler.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-20 02:32:36 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-20 02:32:36 +0100
commit6acbca30b0de51462b1a486c83d936c0c4f5d94e (patch)
treebb6aae47aca0294302b33be816bef3e30d397add /pyload/manager/event/Scheduler.py
parent[Addon] Periodical default to off (diff)
downloadpyload-6acbca30b0de51462b1a486c83d936c0c4f5d94e.tar.xz
Import threading instead thread + thread cleanup
Diffstat (limited to 'pyload/manager/event/Scheduler.py')
-rw-r--r--pyload/manager/event/Scheduler.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pyload/manager/event/Scheduler.py b/pyload/manager/event/Scheduler.py
index 71b5f96af..39dfbc3cc 100644
--- a/pyload/manager/event/Scheduler.py
+++ b/pyload/manager/event/Scheduler.py
@@ -19,8 +19,7 @@
from time import time
from heapq import heappop, heappush
-from thread import start_new_thread
-from threading import Lock
+from threading import Lock, Thread
class AlreadyCalled(Exception):
pass
@@ -106,7 +105,9 @@ class Job:
def start(self):
if self.threaded:
- start_new_thread(self.run, ())
+ t = Thread(target=self.run)
+ t.setDaemon(True)
+ t.start()
else:
self.run()