[Python-Dev] Thread questionlet

Aahz Maruch aahz@rahul.net
Wed, 30 Jan 2002 06:56:04 -0800 (PST)


Christian Tismer wrote:
> 
> I don't try to solve this, either. But since I'm writing some kind of
> platform independant threads (isn't it funny? by using non-portable
> tricks, I get some portable threads), I'd like to think about how
> this world *could* look like.  Maybe I have a chance to provide an
> (u)thread implementation which is really what people would want for
> real threads?

No, you don't.  Real threads have one killer advantage you just can't
emulate: they can parallelize I/O operations (and theoretically
parallelize computations on multiple CPUs).  The advantage of
microthreads has been that they're lightweight, so they're good for
applications that require *lots* of threads, such as simulations.  I
think keeping this advantage would be a Good Idea.

You might want to look at Ruby, though, because it does what you're
wanting to do.  (I think -- I haven't touched Ruby myself.)
-- 
                      --- Aahz (@pobox.com)

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

We must not let the evil of a few trample the freedoms of the many.