Unnoticed traceback in a thread

Skip Montanaro skip.montanaro at gmail.com
Sun Mar 11 09:44:37 EDT 2018


> Concretely: instead of "start_new_thread(my_thread_function, ...)",
> I use
>
>         def wrapped_thread_function(*args, **kw):
>           try:
>             my_thread_function(*args, **kw)
>           except:
>             ... do whatever is necessary should "my_thread_function" fails ...
>
>         start_new_thread(wrapped_thread_function, ...)
>
> Similar, should you use the "Thread" class (instead of "start_new_thread").

Thanks, that looks like an excellent suggestion.

Skip



More information about the Python-list mailing list