Jython thread safety

Markus Schaber use-net at schabi.de
Wed Dec 5 15:50:14 CET 2001


On Wed, 05 Dec 2001 15:24:44 +0100
Ype Kingma <ykingma at accessforall.nl> wrote:

> - jython has no central interpreter lock like cpython, it uses java's
>   synchronisation mechanisms instead. If you have more than one
>   processor, jython will allow you to use all of them.

As long as the Java virtual machine is capable of using them. (Some JVMs use so-called "green threads", that means they emulate threads. You should make shure that your VM uses "native threads". I remember older blackdown jdk releases to use green threads only.)

> - when you need faster synchronisation, you can use Doug Lea's
>   util.concurrent package for java as it is:
>   http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
>   It's interface is remarkably similar to the python standard
>   synchronisation classes, and it has a lot more to offer.

Goot hint, I'll have a look at this.


"GPL software is not free - the cost is cooperation"

More information about the Python-list mailing list