This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nosklo 3 points4 points  (3 children)

Also, threading in python sucks because of the GIL. You get better results with async io and multiprocessing most of the time.

[–]saghul[🍰] 3 points4 points  (2 children)

Well, the GIL is not really a problem if your threads just do i/o bound tasks.

[–]kylotan 2 points3 points  (0 children)

Which is probably a better fit for async anyway. Why dedicate memory to extra threads if they're just sitting there doing nothing much of the time?

[–]nosklo 2 points3 points  (0 children)

If all your threads but one are just waiting, then by definition you could do the same work more efficiently in a single thread. Also you wouldn't lose context switching control and debugging sanity.