Exceptions in threads?
roy at panix.com
Mon Sep 22 00:23:59 CEST 2003
What is supposed to happen when an exception is raised and not caught in
a thread? The Reference Manual (section 4.2) states "When an exception
is not handled at all, the interpreter terminates execution of the
program, or returns to its interactive main loop", but it looks like
what really happens is the thread is terminated, not the whole program.
If I run the following:
def bogus ():
thread.start_new_thread (bogus, ())
print "still alive"
It keeps printing "still alive". This is Python 2.2.2 on RedHat 6.2
More information about the Python-list