FreeThreading Python?

Steve Spicklemire steve at spvi.com
Sat Jan 20 08:31:35 EST 2001


Hi Python Folk,

I've been living in Zope land now since December
of 1998, so I rarely get a chance to read, let alone
post, to this list... but with Python-2+ etc I've
been wondering about the state of threading and
the future of python.

Here's what I would love: 

<DREAM-MODE>
Go to your favorite 6 processor machine.
type:

python -c 'from test import test_thread'

and all 6 processors are 'max-ed' out while 
different threads are scheduled on different
processors.

</DREAM-MODE>

At one time in the distant past I remember some patches
from Greg Stein (I think) that partially/mostly? allowed
python to run a lot more code free of the dreaded 
Global Interpreter Lock (GIL).  I'm guessing what he
did (I never used, or even examined, these patches
since I didn't have access to a system where they would
have helped me... much). Now that multiprocessor
machines are becoming much more commonplace, is there
any effort aimed at updating these patches, or 'fixing'
the GIL thingy so that mere mortals might be able
to write pure python code that can totally swamp
6 processors at the same time? ;-) 

If not.... I'm guessing that the other option is to
do something like the Zope folks are doing with ZEO and
have multiple processes sharing a common object space
(e.g., ZODB) and each process can be multithreaded
but have a single interpreter instance. Is there any
'beginners' code that implements anything like this?
(something you could show a sophomore, or even me, 
 and hope for comprehension). Best of all... one
that could make my <DREAM-MODE> vision work with
very little change to test/test_thread.py. 

thanks,
-steve





More information about the Python-list mailing list