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 |
exceptions. Ths optionally disassociates handlers from ThreadGroups, |
<ul> |
74 |
which has proven to be too inflexible. (Note that the combination of |
<li> It now allows per-thread installation of handlers for uncaught |
75 |
features in JSR-166 make ThreadGroups even less likely to be used in |
exceptions. Ths optionally disassociates handlers from ThreadGroups, |
76 |
most programs. Perhaps they will eventually be deprecated.) Secondly, |
which has proven to be too inflexible. (Note that the combination of |
77 |
access checks are no longer required when a Thread interrupts |
features in JSR-166 make ThreadGroups even less likely to be used in |
78 |
<em>itself</em>. The <tt>interrupt</tt> method is the only way to |
most programs. Perhaps they will eventually be deprecated.) |
79 |
re-assert a thread's interruption status (and in the case of |
|
80 |
self-interruption has no other effect than this). The check here |
<li> Access checks are no longer required when a Thread interrupts |
81 |
previously caused unjustifiable and uncontrollable failures when |
<em>itself</em>. The <tt>interrupt</tt> method is the only way to |
82 |
restricted code invoked library code that must reassert interruption |
re-assert a thread's interruption status (and in the case of |
83 |
to correctly propagate status when encountering some |
self-interruption has no other effect than this). The check here |
84 |
<tt>InterruptedExceptions</tt>. |
previously caused unjustifiable and uncontrollable failures when |
85 |
|
restricted code invoked library code that must reassert interruption |
86 |
|
to correctly propagate status when encountering some |
87 |
|
<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 |
|
|