| 68 |
|
|
| 69 |
<h2>Threads</h2> |
<h2>Threads</h2> |
| 70 |
|
|
| 71 |
Two minor changes are introduced to the {@link java.lang.Thread} |
Three minor changes are introduced to the {@link java.lang.Thread} |
| 72 |
class: It now allows per-thread installation of handlers for uncaught |
class: |
| 73 |
|
<ul> |
| 74 |
|
<li> It now allows per-thread installation of handlers for uncaught |
| 75 |
exceptions. Ths optionally disassociates handlers from ThreadGroups, |
exceptions. Ths optionally disassociates handlers from ThreadGroups, |
| 76 |
which has proven to be too inflexible. (Note that the combination of |
which has proven to be too inflexible. (Note that the combination of |
| 77 |
features in JSR-166 make ThreadGroups even less likely to be used in |
features in JSR-166 make ThreadGroups even less likely to be used in |
| 78 |
most programs. Perhaps they will eventually be deprecated.) Secondly, |
most programs. Perhaps they will eventually be deprecated.) |
| 79 |
access checks are no longer required when a Thread interrupts |
|
| 80 |
|
<li> Access checks are no longer required when a Thread interrupts |
| 81 |
<em>itself</em>. The <tt>interrupt</tt> method is the only way to |
<em>itself</em>. The <tt>interrupt</tt> method is the only way to |
| 82 |
re-assert a thread's interruption status (and in the case of |
re-assert a thread's interruption status (and in the case of |
| 83 |
self-interruption has no other effect than this). The check here |
self-interruption has no other effect than this). The check here |
| 85 |
restricted code invoked library code that must reassert interruption |
restricted code invoked library code that must reassert interruption |
| 86 |
to correctly propagate status when encountering some |
to correctly propagate status when encountering some |
| 87 |
<tt>InterruptedExceptions</tt>. |
<tt>InterruptedExceptions</tt>. |
| 88 |
|
<li> The <tt>destroy</tt> method, which has never been implemented, |
| 89 |
|
has finally been deprecated. This is just a spec change, reflecting |
| 90 |
|
the fact that that the reason it has never been implmented is that |
| 91 |
|
it was undesirable and unworkable. |
| 92 |
|
</ul> |
| 93 |
|
|
| 94 |
<h2>Timing</h2> |
<h2>Timing</h2> |
| 95 |
|
|