News for hackers. Stuff that matters.
Re:Practical threaded programming with Python by zokier on Thursday August 15, 2013 @04:20PM (#6220317)
I think the discussion around Python threads revolves too much on the performance. Imho Python threads work great when used for what they are suited for: managing control flow, or making the code more readable. Like if you have a task in your app that needs to be done every 5 minutes you could just make something like:

    class ThreadClass(threading.Thread):
        def run(self):
            while True:
                do_stuff()
                sleep(5*60)
and launch it to the background.

There are no comments on this comment yet.