On Fri, 29 May 2020 14:44:40 -0400
These are things that a runtime implementer has to decide on. These are also thing that a runtime use gets to complain about. "Don't share data amongst threads" is not advice to the cpython user to get truly parallel thread execution, its gaslighting them on what the GIL does and when. Its actively harmful to people who read that and don't know any better.
So, the first thing they should know that Python language has multiple implementations optimized for different usecases. And CPython is not the crown of the Python evolution, in a sense, it's the opposite. (Supposedly a stable base on which other implementations can build, but if falls short in many areas even regarding that.)
"Don't share data amongst threads" is not advice
Sure, it's initial assumption an implementation can make, and follow along, which eventually may lead to the removal of GIL (which was added initially as a stopgap measure, as it's indeed the simplest way to implement concurrency). Stackless Python pioneered that approach with tasklets communicating over channels in 1998, probably when Go authors didn't yet popped out from their Plan9 plans. In all fairness, I don't know if Stackless ever fully waved GIL goodbye. If not, it shows how much the Python userbase needs to get rid of GIL. And Python users surely don't need to feel bad about it, they just need to know the language history, and see where they lead it further (hanging all the hopes on CPython will likely keep things where they are).  -- Best regards, Paul mailto:email@example.com