[Python-ideas] Thread exceptions and interruption

Adam Olsen rhamph at gmail.com
Wed Sep 19 23:38:38 CEST 2007

On 9/19/07, Guido van Rossum <guido at python.org> wrote:
> On 9/19/07, Adam Olsen <rhamph at gmail.com> wrote:
> > On 9/19/07, Guido van Rossum <guido at python.org> wrote:
> > > Regarding the issue of exceptions in threads, I indeed see it as a
> > > non-issue. It's easy enough to develop a subclass of threading.Thread
> > > which catches any exceptions raised by run(), and stores the exception
> > > as an instance variable from which it can be retrieved after join()
> > > succeeds.
> >
> > Perhaps a better question then: do you think it correctly handling
> > errors is a significant part of what makes threads hard today?
> If you're talking about unhandled exceptions, no, that's absolutely a
> non-issue. The real issues are race conditions, deadlocks, livelocks
> etc.

I guess the bottom line here is that, since none of the proposed
solutions magically eliminate race conditions, deadlocks, livelocks,
etc, we'll need to try them in the field for quite some time before
it's clear if the ways they do make things better have any significant
effects in reducing the core problems.

In other words, I (and the other pundits) should implement our ideas
in a forked python, and not propose merging back until we've got a
large user base with a proven track record.  Even if that's not as
much fun. ;)

Adam Olsen, aka Rhamphoryncus

More information about the Python-ideas mailing list