Restarting a thread in Python
There’s no reason to let your threads die. If they’re actually crashing, your whole program will crash. If they’re just raising exceptions, you can just catch the exceptions. If they’re returning normally, you can just not do that. You can even trivially wrap a thread function to restart itself on exception or return: def threadwrap(threadfunc): … Read more