Threads?

Aahz Maruch aahz at netcom.com
Mon Jul 3 00:27:02 EDT 2000


In article <8job5d$6i$1 at supernews.com>,
Dale Strickland-Clark <dale at out-think.NOSPAMco.uk> wrote:
>
>I want separate execution paths that run concurrently to (or appear to)
>the main one but share the same code.
>
>The ability for the processes/threads to share memory and signal each
>other would be a bonus.

In that case, it'll be much simpler to use threads.  Check out
threading.Thread.  The one problem with Python threads is that there is
something called the "global interpreter lock".  This means that only
one thread can run Python code at any time, even on a multi-CPU machine.
However, threads that call out to extensions (such as I/O) can run truly
concurrently.
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

The best way to get information on Usenet is not to ask a question,
but to post the wrong information.  --Aahz



More information about the Python-list mailing list