python threads and the linuxthread pthread library

Ype Kingma ykingma at accessforall.nl
Tue Jul 2 16:04:35 EDT 2002


Joseph A Knapka wrote:
> 
> Tim Peters wrote:
> >
> > [anton wilson]
> > > ...
> > > Is the Python Virtual Machine it's own thread?
> >
> > No.  All threads run in the PVM, but the GIL serializes their PVM time.
> 
> Does Jython lift this limitation, by any chance? Or is
> the GIL a universal and unchangable Python artifact?

Jython does not have this limitation. Jython threads are Java threads.
Some basic types of the jython interpreter are java-synchronized,
eg. the dictionary type used for namespaces and threading.Lock.

For synchronisation you can use the standard python things, and also
others, eg util.concurrent by Doug Lea.

Finally, it's easy to manipulate the java thread priority from jython.


Have fun,
Ype



More information about the Python-list mailing list