L
Lew
Daniel said:Actually, thats on page 93.
That's funny, actually I quoted it from the passage in the book that actually
I had open to p. 142 as I actually typed. Actually.
Daniel said:Actually, thats on page 93.
Actually, thats on page 93.
Page 143 does state:
"Only code that implements a thread's interruption policy may swallow an
interruption request."
So there are three possible responses:
1. Propagate the exception
2. Restore the interruption status.
3. Swallow the interrupt, but *only* if your code is part of the
thread lifecycle management.
That's funny, actually I quoted it from the passage in the book that
actually I had open to p. 142 as I actually typed. Actually.
ClassCastException said:So, the original advice of either propagate the exception or restore the
interruption status was aimed at library authors writing methods that
might have to handle InterruptedException but that aren't supposed to
know about (or care about, or interfere with) the caller's management of
threads.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.