[Stackless] liberating stackless.run()

Kristján Valur Jónsson kristjan at ccpgames.com
Fri Feb 7 15:56:27 CET 2014

I have a very nice change in the wings for stackless.
in my stackless-scratch repo (https://bitbucket.org/krisvale/stackless-scratch) there is a branch called nested-run.

This allows stackless.run() to be called from any tasklet.  What is more, more than one stackless.run() can be in effect.  They nest and the innermost is in effect at  any one time.
This is useful because we can now write code that runs e.g. the event loop on a tasklet.  This simplifies e.g. monkeypatching code.

There is a bunch of unittests involved, testing this.

In the process, I discovered that the deadlock detection and handling code in 2.7 was broken in various ways.  I have fixed that and added unittests in stackless-dev/stackless.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20140207/910aeb8f/attachment-0001.html>

More information about the Stackless mailing list