[Stackless] Proposed modification WRT threading and scheduling

Kristján Valur Jónsson kristjan at ccpgames.com
Sat May 3 14:55:03 CEST 2008


It doesn't exit, you just get the deadlock exception, right?
This is what has always happened, and what used to happen if you
compiled stackless without Thread support.  How is this bad?

Or do you intend for another thread to call send here?

The thing is that stackless can't be very smart about deadlock
detection in the presence of threads.  We cannot assume that a
running thread is playing the tasklet game, the same way we can
assume that a runnable tasklet is.

I do think our change for stackless.run() makes perfect sense.
But maybe we should have the possibility to turn off this deadlock
detection, or make it smarter somehow.  Any ideas?

K

> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless-
> bounces at stackless.com] On Behalf Of Richard Tew
> Sent: Tuesday, April 29, 2008 00:01
> To: Kristján Valur Jónsson
> Cc: Stackless mailing list
> Subject: Re: [Stackless] Proposed modification WRT threading and
> scheduling
>
> On Wed, Apr 2, 2008 at 8:19 PM, Richard Tew <richard.m.tew at gmail.com>
> wrote:
> >  I have applied Kristjan's patch to the release25-maint branch:
> >  http://svn.python.org/view?rev=62120&view=rev
> >
> >  We have changed the default behaviour so that the thread blocking is
> >  not used unless you pass the argument to enable it when you run the
> >  watchdog.
> >
> >  e.g. stackless.run(threadblocking=True)
>
> Hmm.  We have changed behaviour in a way which is perhaps not good.
>
> Type this in the interpreter:
> import stackless
> c = stackless.channel()
> c.receive()
>
> This immediately exits.  I discovered this because my a hobby project
> was not working any more and eventually tracked it down to this.
>
> Cheers,
> Richard.
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless





More information about the Stackless mailing list