[Python-3000] threading, part 2 (original) (raw)
Josiah Carlson jcarlson at uci.edu
Fri Aug 11 18:15:32 CEST 2006
- Previous message: [Python-3000] threading, part 2
- Next message: [Python-3000] threading, part 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Jason Orendorff" <jason.orendorff at gmail.com> wrote:
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.
Considering that it will not be accessable via standard Python, only through a few ctypes hoops, I believe that is a fairly ready indication that one should be wary of its use. I also think it would make sense to fix that particular instance (to not do so seems to be a bit foolish).
- Josiah
- Previous message: [Python-3000] threading, part 2
- Next message: [Python-3000] threading, part 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]