mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 21:42:21 +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:
|
class SetupTimer:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def start(timer):
|
def start(timer):
|
||||||
thread_timer = Process(target=timer.run)
|
timer.setDaemon(True)
|
||||||
thread_timer.start()
|
timer.start()
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import time
|
import time
|
||||||
|
import threading
|
||||||
|
|
||||||
|
class Timer(threading.Thread):
|
||||||
class Timer:
|
|
||||||
def __init__(self, timeout, timeout_function, checker_func=None, checker_success_function=None, **kwargs):
|
def __init__(self, timeout, timeout_function, checker_func=None, checker_success_function=None, **kwargs):
|
||||||
|
threading.Thread.__init__(self)
|
||||||
self.timeout = int(timeout)
|
self.timeout = int(timeout)
|
||||||
self.timeout_function = timeout_function
|
self.timeout_function = timeout_function
|
||||||
self.timeout_function_args = None
|
self.timeout_function_args = None
|
||||||
|
|
Loading…
Reference in a new issue