is it safe to stop a thread?

David Bolen db3l at fitlinxx.com
Thu May 24 00:24:32 CEST 2001


"Parzival Herzog" <parz at home.com> writes:

> Dustin, (and I, and perhaps others) want not to have the OS kill
> some OS thread, but a way to signal a python program running in a
> thread, e.g. raise an exception handled by the subject thread, say
> "thread.alerted" that alerts that thread.  The thread can handle the
> exception in any way it wants, including to terminate itself.

Note that this still devolves into needing some support at the OS
thread level for precisely those sort of interruptions - otherwise
your Python thread can be blocked in an OS service which will prevent
Python from delivering the exception.

Of course, one could make such exception handling conditional on
whatever underlying support the OS-specific thread module could
deliver.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list