[Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless/module scheduling.c, 1.112, 1.113 taskletobject.c, 1.119, 1.120

Christian Tismer tismer at centera.de
Tue Dec 20 22:39:15 CET 2005


Update of /home/cvs/slpdev/src/2.3/dev/Stackless/module
In directory centera.de:/tmp/cvs-serv4426/src/2.3/dev/Stackless/module

Modified Files:
	scheduling.c taskletobject.c 
Log Message:
making sure that tasklets from other threads are really finalized.
This topic might be improved a bit - it is still not quite clear
why we end up without cleaning up a thread's main early?

Index: scheduling.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/module/scheduling.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** scheduling.c	19 Jan 2005 19:02:31 -0000	1.112
--- scheduling.c	20 Dec 2005 21:39:12 -0000	1.113
***************
*** 1013,1016 ****
--- 1013,1017 ----
  	}
  
+ 	prev->ob_type->tp_clear(prev);
  	/* now it is safe to derefence prev */
  	Py_DECREF(prev);

Index: taskletobject.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/module/taskletobject.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** taskletobject.c	9 Dec 2005 18:00:43 -0000	1.119
--- taskletobject.c	20 Dec 2005 21:39:12 -0000	1.120
***************
*** 933,938 ****
  	 */
  	if (slp_get_frame(task) == NULL) {
! 	    Py_INCREF(Py_None);
! 	    return Py_None;
  	}
  	/* we might be called after exceptions are gone */
--- 933,941 ----
  	 */
  	if (slp_get_frame(task) == NULL) {
! 		/* just clear it, typically a thread's main */
! 		/* XXX not clear why this isn't covered in tasklet_end */
! 		task->ob_type->tp_clear(task);
! 		Py_INCREF(Py_None);
! 		return Py_None;
  	}
  	/* we might be called after exceptions are gone */
***************
*** 973,977 ****
  int PyTasklet_GetBlocked(PyTaskletObject *task)
  {
!     return task->flags.blocked;
  }
  
--- 976,980 ----
  int PyTasklet_GetBlocked(PyTaskletObject *task)
  {
! 	return task->flags.blocked;
  }
  


_______________________________________________
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