Python microthreads

Will Ware wware-nospam at world.std.com
Wed Aug 4 12:37:39 EDT 1999


Will Ware schrieb in Nachricht ...
> I haven't looked at Stackless Python, but it sounds like
> an unrelated thing. As I recall, Stackless Python uses the
> C stack for everything...

Dirk-Ulrich Heise (hei at adtranzsig.de) wrote:
> No, Christian wanted to eliminate the use of the C stack
> and works with the frame objects as well. Maybe one of you
> two re-invented the wheel of the other?

It looks like wheel reinvention is definitely happening.
I've now looked a little bit at Christian's work, and it
looks like there is a lot in common. It probably makes
sense, at least in the long term, to implement microthreads
using Stackless Python. I'll need to study his work more
carefully before I'm ready to migrate.

> Anyway, i just wanted to know whether the two things are
> of independent origins...

Yes, they're independent. Christian has already been in
consultation with the gods of Python, so I think his work is
more in the mainstream spirit of the Python codebase. I
don't think CPython loses anything by being stackless, so
maybe stacklessness could be folded into the core release.
So implementing microthreads separately will become an
increasingly bad idea.

I don't know if Christian's version of eval_code2 can be
stepped a controlled number of opcodes. That would need to
be done for microthreads.
-- 
 - - - - - - - - - - - - - - - - - - - - - - - -
Resistance is futile. Capacitance is efficacious.
Will Ware	email:    wware @ world.std.com




More information about the Python-list mailing list