[Stackless] Stackless status

Christian Tismer tismer at appliedbiometrics.com
Mon Oct 9 10:01:34 CEST 2000

Just van Rossum wrote:
> At 10:10 PM -0400 08-10-2000, Gordon McMillan wrote:
> >What I've found is that an exception
> >that crosses a continuation-boundary produces a leak (at
> >least, that's my best deduction). If you catch the exception
> >within the continuation, all is fine; but if you let it cross back
> >into the guy that called the continuation, you're stuck. Seems
> >to me I discovered this by toying with generator-like patterns:
> >throwing an IndexError in the continuation, so the (caller of
> >the) caller would fall out of a for loop. That's with 1.1.

Didn't check Gordon's leak yet, but it sounds like there
might be something.

> This sounds very similar to what I've posted. (Can _anyone_ reproduce the
> leak in my script? Even with Chris' latest version it leaks, but Chris
> can't reproduce it.)
> I've just tried to reproduce what you describe without the timeslice()
> function, and failed. Do you have a minimal example?

I also tried different timeslice times, downto zero, without
any effect. In principle, this is the expected behavior,
since I automatically lock when an exception happens. At least
it works this way on windows.
So here my question: Is there something MAC specific that I don't
know about? Do you know of any specific code in the core? I'm
absolutely not aware of this.
Is there something like profiling or tracing by default?

Especially: Does the MAC have a proper tstate?

ceval.c, line 1002ff:

    if (tstate->uthread_func 
          && !tstate->uthread_lock
          /* y2k0326 inhibit uthreads in an exception context */
          && !tstate->curexc_type) {
        int ticks = tstate->interp->checkinterval - tstate->ticker;
        int mt = tstate->uthread_ticker -= ticks;
        if (mt <= 0)

Is it possible that tstate->curexc_type works differently on the
MAC, or even that I understand this thing the wrong way and
it does not always reliably tell me that an exception is

ciao - chris

Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     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 mailing list