[Stackless] slp_kill_tasks_with_stacks is broken

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Oct 11 15:39:08 CEST 2011


This issue should be fixed now.
But looking at it, the entire premise of kill_task_with_cstack is more or less  broken, because it cannot synchronously kill tasks from other threads.  There is no synchronous switching between threads.   So I suspect that we have to just accept that when the process is exiting, that we cannot guarantee that tasklets are unrolled.  This is similar to what happens when the main thread exits in regular python.  The other threads are not given the opportunity to exit.  The process just terminates them too.  This is not necessarily a bad thing.

K

-----Original Message-----
From: stackless-bounces at stackless.com [mailto:stackless-bounces at stackless.com] On Behalf Of Kristján Valur Jónsson
Sent: 7. október 2011 12:16
To: The Stackless Python Mailing List
Subject: Re: [Stackless] slp_kill_tasks_with_stacks is broken

Yes, I just noticed that. 
Unfortunate, I'll try to do a super great fix soon.
K

> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless- 
> bounces at stackless.com] On Behalf Of Richard Tew
> Sent: 3. október 2011 09:52
> To: The Stackless Python Mailing List
> Subject: Re: [Stackless] slp_kill_tasks_with_stacks is broken
> 
> 2011/9/23 Kristján Valur Jónsson <kristjan at ccpgames.com>:
> > I've spent more thought on this.
> > The end_tasklet() game is played because we create many temporary 
> > main
> tasklets when we enter python through the C api.
> > This mechanism needs to be refined a bit when it comes to the main
> tasklet, for example, system exit exceptions should be propagated 
> outwards on the main tasklet.
> > For the tstate cleanup, it appears that a new temporary main tasklet 
> > needs
> to be created for things to work.
> > I'll work some on getting these things shored up in the next days.
> 
> You might want to keep on shoring ;-)  test_threading locks up, likely 
> in an infinite loop.  I'm seeing this in the latest from SVN and the 
> identical code what is in the coming Stackless HG repo.
> 
> Cheers,
> Richard.
> 
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless



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





More information about the Stackless mailing list