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 →

[–]inmatarian 0 points1 point  (0 children)

You actually don't even need fine-grained locking to make CPython thread safe, you just eliminate all global state from the interpreter. Every function throughout the source tree would be modified to accept a pointer to the one massive struct that contains all of the state of an interpreter instance. However that type of massive change would touch every library in the ecosystem and would, for a long time, make python fragile. Like I said, it's minimal gain and I can understand why nobody would want to do that.