[Stackless] 2.5b3 has been merged into SVN trunk

Jeff Senn senn at maya.com
Mon Aug 21 19:59:45 CEST 2006

On Aug 14, 2006, at 7:08 AM, Richard Tew wrote:
> - Compile it and make sure it compiles properly on your platform.  I

Seems fine for OS-X.
All (expected) tests succeed.

> The known bugs at this time are:
> - When the taskspeed.py test is run in release mode, channel / tasklet
>   garbage collection causes a tasklet that has only ever been soft
>   switched into, to be hard switched into so that the tasklet exit
>   exception can be raised on it.
>   While I have debugged this, I do not have an idea of the proper fix
>   for it yet.

How does this manifest? (I don't think I notice a problem on OS-X...
or does that have something to do with my first patch below...)

I have a few patches (included below).

I believe the first fixes some problem we were having a few weeks ago,
but don't remember what...  It seems like safer code in any case.

The second allows running the scheduler from other than the first thread
(I don't really see any problem with this.  I.e. to me, the check seems
overly conservative)

And the third adds a 'teststackless' to the makefile so I can remember
how to run the stackless tests. :-)


Index: Stackless/module/taskletobject.c
--- Stackless/module/taskletobject.c    (revision 51431)
+++ Stackless/module/taskletobject.c    (working copy)
@@ -103,7 +103,7 @@
                 Py_XDECREF(_hold); \
-       if (t->f.frame != NULL)
+       if (slp_get_frame(t) != NULL)
                 kill_finally((PyObject *) t);
         TASKLET_SETVAL(t, Py_None); /* always non-zero */
         /* unlink task from cstate */
Index: Stackless/module/stacklessmodule.c
--- Stackless/module/stacklessmodule.c  (revision 51431)
+++ Stackless/module/stacklessmodule.c  (working copy)
@@ -216,9 +216,10 @@
         int err;
         if (ts->st.main == NULL) return PyStackless_RunWatchdog_M 
-       if (ts != slp_initial_tstate || ts->st.current != ts->st.main)
+       if (ts->st.current != ts->st.main)
-                   "run() must be run from the main thread's main  
+                   "run() must be run from the main tasklet.",
         if (timeout <= 0) {
Index: Makefile.pre.in
--- Makefile.pre.in     (revision 51431)
+++ Makefile.pre.in     (working copy)
@@ -621,6 +621,10 @@
                 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
                 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
+teststackless: all platform
+               pushd Stackless/unittests; $(RUNSHARED) ../../$ 
(BUILDPYTHON) -E -tt runAll.py; popd
#  Run the unitests for both architectures in a Universal build on OSX
#  Must be run on an Intel box.
testuniversal: all platform

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list