python threads on multi-CPU machines

Aahz aahz at pythoncraft.com
Mon Aug 18 14:03:26 EDT 2003


In article <5a4226f0.0308180945.34f96eca at posting.google.com>,
Kevin Cazabon <kevin at cazabon.com> wrote:
>Aahz:
>>
>> However, C extensions can release the GIL, and almost all I/O code
>> in Python does that, so I/O-heavy programs will make good use of the
>> SMP.
>
>FYI, I'm also working on adding that functionality to the PIL library,
>seeing as imaging operations can be fairly expensive too.  It makes
>these processes more "friendly" to other threads (and Tk) even on
>single-CPU boxes, and allows taking advantage of multiple CPUs where
>available.

Cool!  When you're done, I'd appreciate it if you could write up a short
summary of the problems you ran into and post it here.  I'm interested
in pushing computational threading in Python, but I haven't written
enough C code to have any idea how it differs from other kinds of
threading issues.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

This is Python.  We don't care much about theory, except where it intersects 
with useful practice.  --Aahz




More information about the Python-list mailing list