logo       

Re: proper handling of InterruptedException: msg#00076

java.jsr.166-concurrency

Subject: Re: proper handling of InterruptedException

Just one additional note:

> or should the thread catch it, ignore it and gracefully die?

The only circumstances where a thread can "gracefully die" due to an
exception is in the threasd's own run() method - where a return will cause
the thread to gracefully die. In that one case it is fine to catch it and
gracefully die - you aren't ignoring it as you are dying in response to it.

But any method further down the call chain needs to re-throw or re-assert as
Brian/Joe mentioned.

Cheers,
David Holmes


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise