|
|
|
|
|
by zokier
4697 days ago
|
|
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. |
|