threads killing other threads

Les Smithson lsmithso at NOhare.SPAM.demon.co.uk
Fri Feb 8 16:17:07 EST 2002


>>>>> "Aahz" == Aahz Maruch <aahz at panix.com> writes:

    Aahz> In article <a40h4g$kl5$1 at newsreader.mailgate.org>,
    Aahz> Les Smithson  <lsmithso at NOhare.SPAM.demon.co.uk> 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 pobox.com)


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