Does Jython have the GIL? Does Jython have the GIL? multithreading multithreading

Does Jython have the GIL?


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_19Type "help", "copyright", "credits" or "license" for more information.>>> from __future__ import GIL  File "<stdin>", line 1SyntaxError: Never going to happen!>>> 


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

See also:

from __future__ import braces


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.