> 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 ...
>
>
Skip Montanaro writes:
> I have a program which is almost always running in a single thread. It
> uses a daemon thread (via threading.Timer) to periodically checkpoint
> some state. The program runs for days at a time.
>
> Over the past couple days, two instances of the subthread croaked with
> t
On 03/08/2018 05:06 PM, Lawrence D’Oliveiro wrote:
On Friday, March 9, 2018 at 11:43:00 AM UTC+13, Paul Rubin wrote:
That you're using threading.Lock for something like this is a borderline
code smell.
Any use of multithreading in non-CPU-intensive code is a code smell.
But CPU intensive co
I have a program which is almost always running in a single thread. It
uses a daemon thread (via threading.Timer) to periodically checkpoint
some state. The program runs for days at a time.
Over the past couple days, two instances of the subthread croaked with
tracebacks because while they were it