[Python-Dev] Stackless Python

Bob Ippolito bob at redivi.com
Mon May 31 20:49:33 EDT 2004


On May 31, 2004, at 8:37 PM, Phillip J. Eby wrote:

> At 02:09 AM 6/1/04 +0200, Christian Tismer wrote:
>> Anyway, I don't really get the point.
>> 95% of Stackless is doing soft-switched stackless calls.
>> Behavior is completely controllable. We can easily avoid
>> any special C stack operation, by setting a flag that
>> disallows it (easy to implement) or by excluding the hard
>> switching stuff, completely (not an option now, but easy, too).
>
> If soft-switching is portable (i.e. pure C, no assembly), and is 
> exposed as a library module (so that Jython et al can avoid supporting 
> it), then perhaps a PEP for adding that functionality to mainstream 
> Python would be meaningful.

Soft switching needs to be implemented in a few key places of the 
interpreter itself or else Stackless would surely have been maintained 
as an extension module.  It is already pure C, no assembly or platform 
specific code.  Supporting the interface from Jython or IronPython 
should be possible, though at worst case each tasklet might actually be 
a new thread so it might not be terribly efficient... though it would 
work.

> If that gets in, then the other 5% can always sneak in later via 
> feature creep.  ;)  Or, more importantly (if I understand correctly), 
> it could be separately distributed as an add-on for platforms that can 
> support it.

Hard switching could be an add-on for platforms that support it..

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20040531/4ed2b745/smime.bin


More information about the Python-Dev mailing list