Hacker News new | ask | show | jobs
by lambda_cube 5418 days ago
He's not saying that. He's saying that the GIL isn't a limitation to certain kinds of application, the kinds that Python usually is used for. The kinds of applications where the GIL would be a limitation, Python also has another limitation: slow performance, and performance is usually the reason to run things in parallel.

With PyPy the performance will get better, and they also have a GC, so that hinder is removed. I don't really know if PyPy has a GIL, I would guess that they don't.

1 comments

"With PyPy the performance will get better, and they also have a GC, so that hinder is removed. I don't really know if PyPy has a GIL, I would guess that they don't."

PyPy still has GIL:

http://codespeak.net/pypy/dist/pypy/doc/faq.html#does-pypy-h...

For more information about it, check these sources:

Official PyPy Status Blog - http://morepypy.blogspot.com/2008/05/threads-and-gcs.html

Thinking about the GIL (read the whole thread, interesting stuff) - http://mail.python.org/pipermail/pypy-dev/2011-March/006991....

Ok, the PyPy FAQ says: "Yes, PyPy has a GIL. Removing the GIL is very hard. The first problem is that our garbage collectors are not re-entrant."

Is it really necessary for the GC to be re-entrant to run the interpreter in parallel? Couldn't you have the interpreter running in parallel and then when there is a need to run the GC you have a global GC lock that prevents all threads from running - a stop the world GC. The application runs for a longer time than the GC, right? So it would be a win and a step in the right direction? I believe the early Java mark and sweep GC was like that, and then later Sun developed several different kinds of concurrent and parallel GCs.

> Official PyPy Status Blog

Oh I read that every time they write something. :) But I started reading it in late 2010 and I haven't gone back to the archives, I guess it's time to do that. Thanks for the links.

PyPy also has a plan to get rid of the GIL: http://morepypy.blogspot.com/2011/06/global-interpreter-lock...