[Zope-dev] Zope 2.7 running with Stackless 3.0
Michael Hudson
mwh at python.net
Thu Aug 28 13:27:31 EDT 2003
Shane Hathaway <shane at zope.com> writes:
> On 08/27/2003 07:55 PM, Christian Tismer wrote:
> > just by chance, I got into the position to try out
> > Zope 2.7.0 beta 1/2, and since it needs Python 2.2.3
> > at least, and Stackless 3.0 was just ported to that, I tried
> > to build Zope with Stackless 3.0.
> > It works very very well! After a few patches to get the includes
> > right, here the installation instructions.
>
> I am in awe. Cool. :-)
>
> However, I am also a little confused. As I understand it, Stackless
> needs all C code to be non-reentrant, i.e. C code must never call back
> into Python. But Zope has a lot of reentrant code, especially in
> Acquisition and ZODB. Doesn't that prevent Zope from taking advantage
> of Stackless continuations?
I think this is the magic of stackless 3: it uses assembler to move
pesky bits of the C stack away in some circumstances.
Not all C code can safely have this done to it, mind, but most can
(how often do you take the address of a stack variable and expect it
to be valid for an extended period of time?).
Cheers,
mwh
--
This proposal, if accepted, will probably mean a heck of a lot of
work for somebody. But since I don't want it accepted, I don't
care. -- Laura Creighton, PEP 666
More information about the Python-list
mailing list