[Stackless] Stackless crash

Richard Tew richard.m.tew at gmail.com
Thu Jun 29 16:29:30 CEST 2006

On 6/19/06, Jeff Senn <senn at maya.com> wrote:
> This (tiny bit of) code causes stackless crash on OS-X.

And on Windows.

> import stackless
> def task(a):
>    stackless.channel().receive()
> x=stackless.tasklet(task)(0)
> x.insert()
> x=stackless.tasklet(task)(1)
> x.insert()
> stackless.run()

You do not need to explicitly insert these tasklets.  Calling them
with the arguments to use does this implicitly.

> ------------------------------
> Interestingly, changing the task code to this:
> def task(a):
>    c=stackless.channel()
>    c.receive()
> does NOT crash.  So I'm guessing it has something to
> do with the deadlock detection stuff...

Or a channel being garbage collected.  Looks like a straightforward
fix, the channel needs to hold a reference to itself while there are tasklets
blocked on it.

Care to provide a patch for this one? :)


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list