[dmd-concurrency] Thread termination protocol (shutdown protocol evolved)

Sean Kelly sean at invisibleduck.org
Tue Feb 9 09:40:00 PST 2010


On Jan 21, 2010, at 11:27 AM, Andrei Alexandrescu wrote:

> Michel Fortin wrote:
>> I disagree about inheriting from Error: Terminate isn't an error. You're probably right that it shouldn't be an Exception, so in that case it should inherit from Throwable, not Error.
> 
> The hierarchy as described in TDPL has Error and Exception inheriting Error. I think it's ok to rename Error into the more descriptive Throwable. Sean?

Oops... I just noticed that this was on my "to reply" list.  The only issue with this is that specific Error objects would all be siblings of Exception--they wouldn't have a common parent to identify them as Errors.  I thought it might be handy to have a common parent in case we want to treat Errors differently at some point, though I guess we could just as easily assume that everything that isn't an Exception is an Error and exclude that way.  It just means slightly different logic:

try {}
catch( Exception e ) { throw e; }
catch( Throwable e ) { /* handle error */ }


More information about the dmd-concurrency mailing list