summaryrefslogtreecommitdiffstats
path: root/pyload/manager/event/Scheduler.py
diff options
context:
space:
mode:
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()