mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 03:52:17 +03:00
timer thread form was changed to daemon
This commit is contained in:
parent
bf9af4042a
commit
70495628c7
2 changed files with 5 additions and 4 deletions
|
@ -4,5 +4,5 @@ from multiprocessing import Process
|
|||
class SetupTimer:
|
||||
@staticmethod
|
||||
def start(timer):
|
||||
thread_timer = Process(target=timer.run)
|
||||
thread_timer.start()
|
||||
timer.setDaemon(True)
|
||||
timer.start()
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import time
|
||||
import threading
|
||||
|
||||
|
||||
class Timer:
|
||||
class Timer(threading.Thread):
|
||||
def __init__(self, timeout, timeout_function, checker_func=None, checker_success_function=None, **kwargs):
|
||||
threading.Thread.__init__(self)
|
||||
self.timeout = int(timeout)
|
||||
self.timeout_function = timeout_function
|
||||
self.timeout_function_args = None
|
||||
|
|
Loading…
Reference in a new issue