[Python-3000] improved threading in py3k
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Fri Aug 4 23:42:07 CEST 2006
"tomer filiba" <tomerfiliba at gmail.com> writes:
> once a thread is created, there is no way to kill it *externally*.
> which is a pity, since the thread must be "willing" to die,
Doing that unconditionally is impractical: the thread has no way
to protect itself from being killed at moments it has invariants of
shared data temporarily violated.
I agree that it should not require continuous checking for a
thread-local "ask to terminate" flag spread into all potentially
long-running loops, i.e. it requires a language mechanism. But it
must be temporarily blockable and catchable.
Here is how I think the design should look like:
http://www.cs.ioc.ee/tfp-icfp-gpce05/tfp-proc/06num.pdf
This is the same issue as with other asynchronous exceptions like ^C.
What has happened to Freund's & Mitchell's "Safe Asynchronous Exceptions
For Python" <http://www.cs.williams.edu/~freund/papers/02-lwl2.ps>?
My design is an extension of that.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Python-3000
mailing list