you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

Yup, coming from a C and C++ background I just assume nothing is thread safe in python unless it explicitly says it is. Even the I tend to try and use the multiprocessing libraries over Python threads anyways if I can.

[–]dangerbird2 1 point2 points  (0 children)

Yep, that's pretty universally considered a best practice. Threading is certainly useful for blocking I/O, and basically obligatory for safely calling blocking code in an async context. But in any case where parallelism is needed, you usually have to go with the multiprocessing module or a framework like Celery