[Stackless-checkins] r51871 - stackless/Python-2.4.3/dev/Stackless/module/taskletobject.c

richard.tew python-checkins at python.org
Wed Sep 13 14:42:05 CEST 2006


Author: richard.tew
Date: Wed Sep 13 14:42:05 2006
New Revision: 51871

Modified:
   stackless/Python-2.4.3/dev/Stackless/module/taskletobject.c
Log:
Ported from release-maint25 (r51810): The recent bug fix to the killing of tasklets when the interpreter exited, still left in an assertion that would be hit under certain circumstances.  While the assertion might be a useful sign something is going wrong, unfortunately there is no way to detect if it is running when the interpreter shuts down, and to only trigger it if that is no the case.

Modified: stackless/Python-2.4.3/dev/Stackless/module/taskletobject.c
==============================================================================
--- stackless/Python-2.4.3/dev/Stackless/module/taskletobject.c	(original)
+++ stackless/Python-2.4.3/dev/Stackless/module/taskletobject.c	Wed Sep 13 14:42:05 2006
@@ -79,8 +79,12 @@
 	PyTaskletObject *self = (PyTaskletObject *) ob;
 	int is_mine = ts == self->cstate->tstate;
 
-	/* this could happen if we have a refcount bug, so catch it here. */
+	/* this could happen if we have a refcount bug, so catch it here.
 	assert(self != ts->st.current);
+	It also gets triggered on interpreter exit when we kill the tasks
+	with stacks (PyStackless_kill_tasks_with_stacks) and there is no
+	way to differentiate that case.. so it just gets commented out.
+	*/
 
 	self->flags.is_zombie = 1;
 	while (self->f.frame != NULL) {
@@ -103,6 +107,7 @@
 		Py_XDECREF(_hold); \
 	}
 
+	/* if (slp_get_frame(t) != NULL) */
 	if (t->f.frame != NULL)
 		kill_finally((PyObject *) t);
 	TASKLET_SETVAL(t, Py_None); /* always non-zero */

_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list