Jython, GILs and object locking.

Jon Franz jfranz at neurokode.com
Fri Oct 10 21:15:41 EDT 2003


>    Python supports this. By having the I/O operations release the GIL
> multiple CPUs may perform work simultaneously.

You mean an extension in which you hand off the I/O from your
python program to a (c) module that handles the work in a truely
seperate thread?  Writing a c extension should not be required
to use multiple CPUs.  If I am wrong, and python _can_ use
multiple cpus without using such an extension, please let me know.

> 
> > I think, however, that until (IF) the GIL is removed, a
> > simple documentation change could be very useful.  That
> > is, in the thread module docs, and the tutorials (and
> > anyplace that mentions threading) mention that python, due to
> > the GIL, cannot use multiple processors.
> 
>    That would be inaccurate. The Python documents should be accurate.

See the above.  The python documentation should be accurate for 
programming with python, not what you can do if you write an 
extension module.

Are there such modules freely in existence?

~Jon Franz





More information about the Python-list mailing list