Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Removing the lock creates problems in existing code in practice. This is an ecosystem that has less focus on standards and more on "CPython is the reference implementation".


What non-transparent GIL specific behavior are developers relying on exactly?

When I say GIL specific behavior, I mean "python code that specifically requires a GLOBAL interpreter lock to function properly"

Not something that simply requires atomic access or any of the garuntees that the GIL has this far provided, but like, specifically code that requires GIL like behavior above any CPython implementation details that could be implemented with more fine grained concurrency assurances?

I've seen some really cursed python in my days, like checking against `locals()` to see if a variable was defined ala JavaScript's 'foo in window' syntax (but I suppose more portable), but I can't recall anything specifically caring about a global interpreter lock (instead of what the GIL has semantically provided, which is much different)


> What non-transparent GIL specific behavior are developers relying on exactly?

They are relying on behavior of a single environment. We similarly see a lot of issues moving threaded code to a new operating system in C/C++, because the underlying implementation details (cooperative threading, m:n hybrid threading, cpu-bound scheduling, I/O and signaling behavior) will hide bugs which came from mistakes and assumptions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: