[Python-Dev] Re: [Stackless] comments on PEP 219
tismer at tismer.com
Thu Mar 15 12:30:09 CET 2001
Samuele Pedroni wrote:
> First of all I should admit I ignore what have been discussed
> at IPC9 about Stackless Python.
This would have answered your question.
> My plain question (as jython developer): is there a real intention
> to make python stackless in the short term (2.2, 2.3...)
> AFAIK then for jython there are three option:
> 1 - Just don't care
> 2 - A major rewrite with performance issues (but AFAIK nobody has
> the resources for doing that)
> 3 - try to implement some of the highlevel offered features through threads
> (which could be pointless from a performance point of view:
> e.g. microthreads trough threads, not that nice).
> The option are 3 just for the theoretical sake of compatibility
> (I don't see the point to port python stackless based code to jython)
> or 1 plus some amount of frustration <wink>. Am I missing something?
> The problem will be more serious if the std lib will begin to use
> heavily the stackless features.
Option 1 would be even fine with me. I would make all
Stackless features optional, not enforcing them for the
Option 2 doesn't look reasonable. We cannot switch
microthreads without changing the VM. In CPython,
the VM is available, in Jython it is immutable.
The only way I would see is to turn Jython into
an interpreter instead of producing VM code. That
would do, but at an immense performance cost.
Option 3 is Guido's view of a compatibility layer.
Microthreads can be simulated by threads in fact.
This is slow, but compatible, making stuff just work.
Most probably this version is performing better than
I don't believe that the library will become a problem,
if modifications are made with Jython in mind.
Personally, I'm not convinced that any of these will make
Jython users happy. The concurrency domain will in
fact be dominated by CPython, since one of the best
features of Uthreads is incredible speed and small size.
But this is similar to a couple of extensions for CPython
which are just not available for Jython.
I tried hard to find out how to make Jython Stackless.
There was no way yet, I'm very very sorry!
On the other hand I don't think
that Jython should play the showstopper for a technology
that people really want. Including the stackless machinery
into Python without enforcing it would be my way.
Parallel stuff can sit in an extension module.
Of course there will be a split of modules which don't
work in Jython, or which are less efficient in Jython.
But if efficiency is the demand, Jython wouldn't be
the right choice, anyway.
regards - chris
Christian Tismer :^) <mailto:tismer at tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net/
14163 Berlin : PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
where do you want to jump today? http://www.stackless.com/
Stackless mailing list
Stackless at starship.python.net
More information about the Stackless