How can I kill main thread and terminate program? Now after throwing RuntimeError main thread continue executing
def function_terminate():
raise RuntimeError
def test():
thr = threading.Timer(5.0, function_terminate, args=())
thr.start()
setup()
sleep(6)
thr.cancel()
continue_code()
I can't use thread.interrupt_main() from this question because I'm using threading module not thread
I would be very thankful for your help