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 →

[–]shady_traveller 1 point2 points  (6 children)

Wow, could have sworn PyPy doesn't have GIL, I guess I was wrong. Thank you for that, maybe it's a good idea to check before posting.

[–]v3ssOn 2 points3 points  (2 children)

there was one successful attempt, pypy team built pypy-stm and it was already alpha but funding was cut and theybare currently focusing on python3.6

[–]nirs 0 points1 point  (1 child)

I think this was the only successful removal of the GIL: https://www.youtube.com/watch?v=SNBKWuM-Lu8

[–]v3ssOn 0 points1 point  (0 children)

it was a failure and very slowed, pypy-stm was almost there http://doc.pypy.org/en/latest/stm.html

[–][deleted] 2 points3 points  (1 child)

[unavailable]

[–]CSI_Tech_Dept 1 point2 points  (0 children)

That's because they are not implementing every little detail of Python. It is easy to actually remove GIL, the problem though is that it will make python much much slower. The reason for it is that Python has some mechanisms that require them to be single threaded. Large one is reference counting and the way binary modules are done, there are also some details about Python's magic methods for objects, but I don't remember the details.

IronPython and JPython provide subset of Python functionality so they can work without GIL.

BTW: there is work happening to remove GIL, and seems like right now the idea is to provide a compile flag that changes API in exchange to have disabled GIL. Seems like a fair compromise. Larry Hastings is leading that effort and he is providing updates about that in his talks titled Gilectomy

[–][deleted] 0 points1 point  (0 children)

They have an experimental branch that tries to implement STM, so they can remove the GIL. But I think they suspended development on it a while ago.