Tag: started once

  • Restarting Demon threads in Python

    Having just spent over an hour trying to find how to do this, here is my contribution to the problem. Say that you have a thread that you have called start() on, and your run() method terminates with an exception, or quite naturally (for example, your listening to a socket, and it gets disconnected). Your…