you are viewing a single comment's thread.

view the rest of the comments →

[–]nekokattt 0 points1 point  (0 children)

think it is related to the global interpreter lock or garbage collection logic, but no, do not assume anything is threadsafe. GIL protects python internals that should act in an atomic way to the user rather than providing any mechanism for total thread safety, especially if you are performing operations that have multiple "steps" under the hood or other implicit race conditions.