[Stackless] why the TaskletExit?

Richard Tew richard.m.tew at gmail.com
Wed Jan 24 22:37:27 CET 2007

On 1/24/07, Richard Tew <richard.m.tew at gmail.com> wrote:
> On 1/24/07, Andrew Dalke <dalke at dalkescientific.com> wrote:
> > That still doesn't describe the behavior I see, which is that
> > a receive raises a TaskExit exception.
> >
> > Hmm, perhaps it's part of the garbage collection?  Yeah,
> > that's it.
> Right.  Keep in mind that the tasklet for 'main' will have a reference
> to 'chan' and 'chan' will have a reference to tasklets blocking on
> it which just happens to be the same one which holds a referene
> to it.  So there is no way where the tasklet for 'main' can get
> garbage collected until the interpreter exits, where you see the
> channel get garbage collected and this results in the tasklet
> blocking on it being killed.  Except when you hold the extra
> reference to it in the globals.

Of course, I might be confused and what is killing the
tasklet on interpreter exit is not the garbage collection, but the
call to PyStackless_kill_tasks_with_stacks.  I don't understand
why that wouldn't happen regardless of the extra global reference
though.  So it makes me predisposed towards garbage


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list