Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Jython have the GIL?

Tags:

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.

like image 784
Hanno Fietz Avatar asked Jul 13 '09 15:07

Hanno Fietz


People also ask

Does IronPython have Gil?

But Jython & IronPython don't.

What is difference between Python and Jython?

Difference between Python and JythonReference implementation of Python, called CPython, is written in C language. Jython on the other hand is completely written in Java and is a JVM implementation. Standard Python is available on multiple platforms. Jython is available for any platform with a JVM installed on it.


1 Answers

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!
>>> 
like image 127
Frank Wierzbicki Avatar answered Sep 25 '22 00:09

Frank Wierzbicki