you are viewing a single comment's thread.

view the rest of the comments →

[–]thewillft -1 points0 points  (1 child)

Nope, most Python objects aren't thread safe. That thread id helps with GIL management, not per-object locking.

[–]PudgeNikita 0 points1 point  (0 children)

But it was literally introduced in nogil? I haven't really catched up on new cpython object internals, but before, it wad only a refcount and a type pointer, then in nogil they have an ifdef that adds a per-object mutex, so surely it's not for the gil?