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

I loved the multiprocessing module. Getting rid of the GIL is a major win.

I would prefer not having a GIL, anyway, but this is far better than nothing.



Removing the GIL won't magically solve any problems.

This has been tried before, with disappointing results, which is why I'm reluctant to put much effort into it myself. In 1999 Greg Stein (with Mark Hammond?) produced a fork of Python (1.5 I believe) that removed the GIL, replacing it with fine-grained locks on all mutable data structures. He also submitted patches that removed many of the reliances on global mutable data structures, which I accepted. However, after benchmarking, it was shown that even on the platform with the fastest locking primitive (Windows at the time) it slowed down single-threaded execution nearly two-fold, meaning that on two CPUs, you could get just a little more work done without the GIL than on a single CPU with the GIL.

http://www.artima.com/weblogs/viewpost.jsp?thread=214235


OK... So it´s not a major win.

BTW, how is threading under Jython?


Jython uses Java's native threads, there's no GIL.

Update: Jython 2.5 Easter egg

  >>> from __future__ import GIL
  Traceback (most recent call last):
  (no code object) at line 0
  File "", line 0
  SyntaxError: Never going to happen!
http://zyasoft.com/pythoneering/2008/06/realizing-jython-25....




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

Search: