killing thread ?

Christian Tismer tismer at
Sat Jan 25 05:43:09 CET 2003

Paul Rubin wrote:
> Peter Hansen <peter at> writes:

[about the thread kiling prob]

> Since the new "minimal Python" is supposed to be stackless (all
> activation records are in the heap), maybe that implementation can
> more gracefully deal with the problem of killing a thread failing to
> unwind the C stack.

Well, whether Stackless or not.
Stackless 2.0 itself has the problem to be by
principle unable to kill a tasklet (which is my
tiny kind of threads), since it cannot have full
track of all stack entries, unless we do a ful stack
Stackless 3.0 *will* be able to do this, for those
tasklets which are running without stack copies,
using the "stack-avoidance" scheme of the 1.0 version.
But this is also only a partial solution.

With Minimal Python, we have almost full control over
the whole system. If we provide the code generator, then
we know where the objects are, and we can fotunately
kill threads safely, since we know the stack/object
layout very well.

This still is not a complete solution, since there will
be non-cooperative extension modules which have to be

     -in-Python - ly y'rs -- chris

More information about the Python-list mailing list