[Stackless] Proposed modification WRT threading and scheduling

Richard Tew richard.m.tew at gmail.com
Thu Apr 3 02:19:49 CEST 2008

On Tue, Apr 1, 2008 at 11:41 AM, Kristján Valur Jónsson
<kristjan at ccpgames.com> wrote:
> I have a patch ready, that needs some more testing.
>  There are two aspects to this:
>  1) There is a bug, where calling stackless.run() will block without any possibility of anyone ever unblocking it.  This happens if the main tasklet is the only runnable tasklet.
>  2) during a stackless.run(), another tasklet (on that thread) will thread block when it tasklet blocks and there is no other tasklet on the thread runnable.  Now, doing this possibly reasonable, but quite possibly not so, if you don't have control over that thread.

I have applied Kristjan's patch to the release25-maint branch:

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

e.g. stackless.run(threadblocking=True)


More information about the Stackless mailing list