views:

701

answers:

4

I was sure that it hasn't, but looking for a definite answer on the Interwebs left me in doubt. For example, I got a 2008 post which sort of looked like a joke at first glance but seemed to be serious at looking closer.

Edit: ... and turned out to be a joke after looking even closer. Sorry for the confusion. Actually the comments on that post answer my question, as Nikhil has pointed out correctly.

We realized that CPython is far ahead of us in this area, and that we are lacking in compatibility. After serious brainstorming (and a few glasses of wine), we decided that introducing a Global Interpreter Lock in Jython would solve the entire issue!

Now, what's the status here? The "differences" page on sourceforge doesn't mention the GIL at all. Is there any official source I have overlooked?

Note also that I'm aware of the ongoing discussion whether the GIL matters at all, but I don't care about that for the moment.

+10  A: 

No, it does not. It's a part of the VM implementation, not the language.

See also:

from __future__ import braces
Lennart Regebro
+1. Also, that 2008 post was a bit of a joke...see the comments.
Nikhil Chelliah
+2  A: 

Both Jython and IronPython "lack" the GIL, because it's an implementation detail of the underlying VM. There was a lot of information I've found sometime ago, now the only thing I could come up with is this.

Remember that the GIL is only a problem on multiprocessor enviroment only, and that it's unlikely to go away in the foreseable future from CPython.

voyager
A: 

Google is making a Python implementation that is an modified cpython with performance improvements called unladen swallow. This will take care of removing the GIL. See: Unladen Swallow

Per Arneng
It looks like they are not removing it after all. The approach they took (for removing GIL) turned out to be too naive, so they dropped that idea and instead focused on getting the speedups on single-core. See this talk [1][1] http://pycon.blip.tv/file/3261170/
konryd
+7  A: 

The quote you found was indeed a joke, here is a demo of Jython's implementation of the GIL:

Jython 2.5.0 (trunk:6550M, Jul 20 2009, 08:40:15) 
[Java HotSpot(TM) Client VM (Apple Inc.)] on java1.5.0_19
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import GIL
  File "<stdin>", line 1
SyntaxError: Never going to happen!
>>>
Frank Wierzbicki
+1 for the easter-egg
Blauohr