threads killing other threads

Les Smithson lsmithso at
Fri Feb 8 22:17:07 CET 2002

>>>>> "Aahz" == Aahz Maruch <aahz at> writes:

    Aahz> In article <a40h4g$kl5$1 at>,
    Aahz> Les Smithson  <lsmithso at> wrote:
    >>  I'm sure there's a good reason for Python not implementing
    >> this. Anyone know what it is?

    Aahz> Yes.  It doesn't work.

    Aahz> Oh, sure, there's a long technical explanation of how
    Aahz> arbitrarily killing threads leaves processes in various
    Aahz> kinds of weird states, but it all boils down to, "It doesn't
    Aahz> work."  That goes double for any kind of cross-platform
    Aahz> facility.  Note that Java has pretty much abandoned any
    Aahz> pretence that it can provide this capability.  -- --- Aahz
    Aahz> <*> (Copyright 2002 by aahz at

But doesn't pthread_testcancel allow cooperative threads to be
canceled? This is the portable equivalent to the thread signaling
scheme described earlier. It also gives the canceled thread a chance
to clean itself up before exiting.

Not ideal, but better than nothing.

More information about the Python-list mailing list