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

If any package depends on the GIL, it will be enabled. Packages won't break


What packages might depend on the GIL and why would they need it?


Almost all packages depend on the GIL (at least at first).

They assume they can "take the GIL", and then go and look at the various Python datastructures you passed them without worrying about them changing as they are being read.

The later, when writing out their answer (which might involve editing something they were given), they can assume they are not changing. For example, you could write code which extends the length of a list to 100, then fill in all the members, not worrying half way through your loop another thread shrinks the list back down.


This only applies to native extensions.


Sorry, you are or course correct, I should have said all extensions with native code.


Any C code that uses global variables casually.


Packages with native components that have not been updated for the semantics changes.




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

Search: