Ian Kelly wrote:

And what if the thread gets killed a second time while it's in the except block?

And what if the thread gets killed in the middle of the commit?

For these kinds of reasons, any feature for raising asynchronous
exceptions in another thread would need to come with some related
facilites:

* A way of blocking asynchronous exceptions around a critical
  section would be needed.

* Once an asynchronous exception has been raised, further
  asynchronous exceptions should be blocked until explicitly
  re-enabled.

* Asynchronous exceptions should probably be disabled initially
  in a new thread until it explicitly enables them.

Some care would still be required to write code that is robust
in the presence of asynchronous exceptions, but given these
facilities, it ought to be possible.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to