Message53656
Logged In: YES
user_id=427491
There is no indication of a callback hook in the Thread
class. The source for threading.py shows a _print_exc handle
that I had tested. It is possible to override the name and
get most of the desired behaviour but there are problems.
The following code is from threading.__bootstrap()
_print_exc(file=s)
_sys.stderr.write("Exception in thread %s:\n%s\n" %
(self.getName(), s.getvalue()))
This still generates some output to standard error which is
not desireable. It is also a global setting which is not
what you implied. Your statement is that "each thread has a
hook" is certainly not apparent. in the code. This API is
also different than what is available globally in the sys
module.except() hook. I also checked the cgitb.py module and
it also does't handle threads, apparently. I realize that
there are other ways to handle intercepting and formatting
excetpion output but the callback scheme was so nice. |
|
Date |
User |
Action |
Args |
2007-08-23 16:05:50 | admin | link | issue618633 messages |
2007-08-23 16:05:50 | admin | create | |
|