[Stackless-checkins] r51808 - stackless/trunk/Stackless/core/stacklesseval.c
richard.tew
python-checkins at python.org
Thu Sep 7 14:27:03 CEST 2006
Author: richard.tew
Date: Thu Sep 7 14:27:02 2006
New Revision: 51808
Modified:
stackless/trunk/Stackless/core/stacklesseval.c
Log:
Fix for threading/interpreter exit/tasklet killing bug. The test case was to have 10 threads launched with a time.sleep(0.1) in each. This would cause the tasklet killing to have an access violation when it tried to move the tasklet to be killed before the main tasklet in the scheduling list, but the tasklet being killed was the main tasklet. Now if this is the case, no scheduling ordering changes are made as it is not necessary anyway.
Modified: stackless/trunk/Stackless/core/stacklesseval.c
==============================================================================
--- stackless/trunk/Stackless/core/stacklesseval.c (original)
+++ stackless/trunk/Stackless/core/stacklesseval.c Thu Sep 7 14:27:02 2006
@@ -321,7 +321,7 @@
* killed, they will be implicitly placed before this one,
* leaving it to run next.
*/
- if (!t->flags.blocked) {
+ if (!t->flags.blocked && t != cs->tstate->st.main) {
chain = &t;
SLP_CHAIN_REMOVE(PyTaskletObject, chain, task, next, prev)
chain = &cs->tstate->st.main;
_______________________________________________
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