multithreading concept

John Nagle nagle at animats.com
Wed Feb 7 12:17:10 EST 2007


sturlamolden wrote:
> On Feb 7, 2:53 am, "S.Mohideen" <m... at blackhole.labs.rootshell.ws>
> wrote:
> This has been discussed to death before. Win32 threads and pthreads
> (which is what Python normally uses, depending on the platform) are
> designed to stay idle most of the time. They are therefore not a tool
> for utilizing the power of multiple CPUs, but rather make certain kind
> of programming tasks easier to program (i.e. non-blocking I/O,
> responsive UIs). 

    Multithread compute-bound programs on multiple CPUs are
how you get heavy number-crunching work done on multiprocessors.
Of course, that's not something you use Python for, at least not
until it gets a real compiler.

    It's also the direction games are going.  The XBox 360 forced
game developers to go that way, since it's a 3-CPU shared memory
multiprocessor.  That translates directly to multicore desktops
and laptops.

    I went to a talk at Stanford last week by one of Intel's
CPU architects, and he said we're going have hundreds of
CPUs per chip reasonably soon.  Python needs to get ready.

				John Nagle



More information about the Python-list mailing list