i have a code to run a timer thread and its doing a job every x seconds and its has no problem
import threading
import datetime
def starThread():
t = threading.Timer(0, Do_Analysis())
t.start()
def Do_Analysis():
#define threading.Timer to do the job every x secound
t=threading.Timer(1, Do_Analysis).start()
print('datetime is : ',datetime.datetime.now())
print(threading.active_count)
starThread()
i need to terminate the thread at some point and i dont know how to do it can anyone please guide me
threading.Timer.cancel()method.