[Python-3000] threading, part 2 (original) (raw)

Jason Orendorff jason.orendorff at gmail.com
Fri Aug 11 18:04:09 CEST 2006


On 8/11/06, Josiah Carlson <jcarlson at uci.edu> wrote:

Slawomir Nowaczyk <slawomir.nowaczyk.847 at student.lu.se> wrote: > But it should not be done lightly and never when the code is not > specifically expecting it.

If you don't want random exceptions being raised in your threads, then don't use this method that is capable of raising exceptions somewhat randomly.

I agree. The only question is how dire the warnings should be.

I'll answer that question with another question: Are we going to make the standard library robust against asynchronous exceptions? For example, class Thread has an attribute __stopped that is set using code similar to the example code I posted. An exception at just the wrong time would kill the thread while leaving __stopped == False.

Maybe that particular case is worth fixing, but to find and fix them all? Better to put strong warnings on this one method: may cause unpredictable brokenness.

-j



More information about the Python-3000 mailing list