killing thread ?

Peter Hansen peter at engcorp.com
Fri Jan 24 13:41:03 EST 2003


Paul Rubin wrote:
> 
> Skip Montanaro <skip at pobox.com> writes:
> >     >> You lose. There is no way to cancel a thread, period.
> >
> >     Paul> Is there some inherent reason for that?
> >
> > Not all threads packages on which Python runs implement the desired
> > functionality.
> 
> Well, there's all kinds of functionality that some OS's implement and
> others don't.  Python should use the functionality when it's
> available.

That's a judgment call, and one which was made differently by those
responsible for Python's design.  

It's not a question of right or wrong: Python was intended to be very
cross-platform, as opposed to many other languages which try to provide
support for every nuance of every different platform which results in a 
situation in which programs are absolutely *not* cross-platform because
even relatively simple programs, e.g. those using threads, cannot run
the same on more than one supported platform.

There are actually very few platforms in which it is possibly safely
to terminate threads from the outside, so it's no great loss to most...

-Peter




More information about the Python-list mailing list